Committed for reviewing. Some preliminary and unused code still remains
in the codebase and some things are broken (vectorization of sprites
needs to be fixed).