Minor bug fixes and changes to client-side code