refactor of some low hanging fruit