Refactored dose as an importable module

Simulation example is included (SIM_01.py).