more re-organizing

Getting rid of minor code smells.