removed unused legacy code.
docs re-factored.