Cleaned up code, added to readme.