Update readme and refactor