refactored view constraints to be less coupled