ui refactoring

ui will now correctly update with current inline and block formattings
api was refactored to provide format function
Can we use mutiple ```var``` statements rather than grouping them in the jQuery style?