Moved code to a file