Docs and start to refactor file code away from logic code.
removed old function