modified code / formatting
updated demo
Merge pull request #4 from Daij-Djan/master

Modernized code, improved encapsulation, fixed some formatting AND made demo compilable