Broke code-base into 'api' and 'example' modules.
Tested with device in Linux an Mac OS.
Refactored the API a little bit.
Updated documentation.

Signed-off-by: Paulo Pires <pjpires@gmail.com>