Major code cleanup. Added a bunch more info to the README.