Removed unnessecary function that was causing problems.