Added better error messages.
Fixed ifndef, added comments