Fix typos and refactor