implemented documentation and put in some fixes for the init; extracting REST header before logging; fixed init to work with already initialized repos