Refactor court views and related stuff