added fixes and todos refactorings
Merge pull request #2 from mravinale/master

added fixes and refactorings to do