reorganize the frame interface
engine: revamp API, drop old implementation

API is in quite good shape, but the implementation
has to be redone from scratch.
fix stupid compilation glitch
typo
add vim footer
scripting: simplify the public API.