Getting rid of unnecessary functions