Clean up apu units
Move more apu units functions out of the header