Cleaned up js