refactored into an installable module
fixed imports in examples after restructuring