Better internal class structure.

Although every professional C++ developer would try to kill me for that
mess :)