Organizing methods, moving private methods out of scope and removing duplicate definitions