Better cube parsing in solve