Work on refactoring the finalize method