Switched to using strict check, fixed typo found by @bkardell
Style fixes. Removed unused modulo function.
Switched to using strict equals.