renamed frontend to ui
moved sub-editor code to new file 'internal'
added comments
added 'internal' to represent the state of the internal representations of open buffers