Moved more code