Added a huge amount of docs (100% coverage)
small code refactorings