Add comments to structs
Code organization, move constants to a separate file
JSLint fixes
Fixed rest of the JSLint issues