Simplified javascript setup. Needs more work