Modular UI, API

Changed UI to be modular, a simple and advanced version. Beginning of
user API.