removed unneeded imports
refactoring + more documentation
minor fixes