Moved a method into the constructor