finish JS functionality, clean up UI