Cleaned up code by fixing more JSHint errors