JSLinted and JSHinted. Added minor documentation and spacing for readability.