cleaned up and fixed the JS ui a bit