first draft of framework. Trying to make it easier than before based on what we have learned from pylearn