Removed whitespace, fixed some spacing issues, changed comparisons to strict, added code comments and renamed some constants for clarity.