These checks are hard to deal with later, they should be using object oriented methodology to increase maintainability.