Completely redid the client-side JS