Consolidated/removed repeated code in view classes