Add example and fix some minor issues

Signed-off-by: Nikita 'webconn' Maslov <wkernelteam@gmail.com>