Restructured workfile.rb to be more readable.