Applied minor refactorings
Improved documentation