CPP code Miller, strage behavior still. Needs testing
Edit tests