Factor out framework code into the statefulj-framework project