updated readme, cleaned up code