reorganized HypnocubeImpl into public interface and private implementation