Some cleanup before refactor