Cpu develop

Changes from #691 onto develop