Simplify javascript client