Update dynkas.py

code cleanup