explore functional, needs styling

refactored some js files