STL

Replaced some ad hoc classes with STL-containers, removed cptr autopointer (use intrusive counter for everything).