Removed some useless functions, minfixes