More refactor towards #61