file renaming, added deps
fixed typo; added functions from mmi project
some refactoring and small additions