cleaning up API for UI
more UI API
bug fixes