Refined the mouse driven interface

Remade the containers to a templateclass