More refactor, comments