Fixed JSHint warnings
Made IP address regex more strict (fixes 267)