Updated if statements to class methods. For later use that would allow overrides by users