updated README and subtle changes to code for neatness