new feature: event hooks, Extension API, refactored Document and View