Complete basics of client-side code (bug fixes to come)