update readme, add logging, refactor