Updated and split up unit tests
Changes to pass JSHint