Restructured library and demo applications

Moved the demo apps and setup tools out of the library directory. Adjusted import paths to work with the current path rather than an assumed Frack repository. Cleaned up a few small style errors, but otherwise the code remains unchanged.