Code cleanup for all views