Improved output; restructuring