Refactoring return statements

only some simplifications