Split out types, implementation; clean up includes