Cleaned up js client