Refactored. System rules in rules.py, formulas in formulas.py, 'optimized' some loops, changed variable names etc.. Also new function ror2dollars()