View and code climate fixes 2