cleaned up frontend template and JS