Refactor calc.py into codonpdx script