refactor, go fmt fix, save cursor fix