Refactored constraints_layout.rb to reduce duplicated code.
Merge pull request #38 from motion-kit/refactor/constraints_layout

Refactored constraints_layout.rb to reduce duplicated code.