Examples refactor

Refactored the examples app so that it can now be compiled (minified).