fixing most TODO, cleaning unused functions, updating README