Refactor: added base class for interaction GUIs.

This will make the job of building the St. Gallen interface easier.
Further refactoring for generic interaction class.