ui refactoring

ui will now correctly update with current inline and block formattings
api was refactored to provide format function
Aren't we using "!" explicitly in ```@param``` annotation?