Separate file into script and class