added return c outside of if else block
Added comments for various errors and warnings. Fixed a few syntax errors.