code cleanup and updated readme