flesh out js app code
clean up code