Major framework changes

See thoughts.txt