update directory structure, clean up obsolete code