Separated sample from library project

I find this project useful, so I've decided to help out a bit separating the sample and revamped the project structure into a sample, and a library project.

Hope it helps.