Fix notices
Merge pull request #15 from nbehier/refactoring

Fix notices from last PR