Repalced most private variables to be protected, we want cubex to be
extendable :)