Changed code structure to allow including user-defined analysis modules