Cleanup. Rearrange some methods to maintain alpha sort, move some helpers to a better place