minor additions: refractored js functions, and added skeleton for placeholder input stuff