Some fixes, working cube code