updates a little the design of the code
Merge pull request #12 from cirocosta/bug/scope-issues

updates a little the design of the code