Added hooks, fixed errors, scope & exports adjustments.