More refactorings + some docs started