Cleaned up JS syntax