updated read me and cleaned up code