AlgoBase refactoring
Break up Algorithm headers
Use nicer macro
More Prefs lower to make more accessible
Variable refactoring
Use state vars in Prefs
Start introducing preference variables
Improve Variable API
Fix property
Idea for #378

Will flesh out later
Rename Variable conversion functions

for #598
Working on #598
Reformat
Clean up interface
Note for #598
Merge branch 'refactoring'