Moved code within the file to conform better with existing file structure