Extending documentation
Update scala doc options
Big refactoring