Clean up js syntax