refactors after merge, makes code more ruby-like, removes some "if true"s