Fixed client-side stuff; minor cleanup.