View and code climate fixes