Moved over code to another class