mini refactoring + fix client-side to reflect changes on server-side