Correction bugs + refactoring + indentaiton questions