Added most of the framework