Added README and LICENSE; improved output; cleaned up code a bit