updated README and cleaned up code