Solved name clash and renamed some functions