Refactor the code so that the works can be modeled as an Object's behavior.
Remove unnecessary imports.