Changed the framework to be more class-based

Changed examples and docs as well