Small fixes + refactoring + CS fixes + typo + Doc