Added if statements. __Very__ rough.
Refactored.