update/refactor model code for improved appearance and consistency