added README file; cleaned up code