Corrected syntax errors and made improvements

More...