Removed warnings, added comments