Removed some functions, cleanup