Minor code refactoring and cleanup

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Change example installing to static method

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>