Removed unnecessary if-statements

Passes all unit tests like this.