Moved code into a 'library' folder and added a 'samples' folder.

- Fixed Issue #1 (thanks Nick)