Added better interface for integrating in other pages.

There is still some work to do. Some clean up of code and interfaces
to make it more easy to inject and control the interface when
integrating it.