Complete Framework Flip

Completely changed the framework, Much neater and easier to implement.