Rationalize locations a bit and resolve circular imports