Cleaned unused old files and changed one function calling convention