Fixed and cleaned few files with utilfunctions now located in utils.lua