Changed component to use cube class