Work on the framework

Still a big work in progress