Rework js structure to be more encapsulated/modular. Fix missing inputs in testArea.