Deletes unused code and moves return logic into parent.