Fixed: Decimal points were required in numbers
Cleanup: cost assignment now uses begin-end matching