Updated and removed some functions