Analyser API cleanup, renderer updates

Major refactor of the analyser code, moving to an event-based system.
Allows better extendability.