Cleaned up the output and code a bit