Some work on the demo and the API structure.
Made the API more optimized for importing detektor as a module.