updated readme, did some refactoring