Removed all function definitions not used