Partial refactoring
Documentation refactoring
Small fixes for documentation