fixed all fixable todo's (the rest of the todo's has to be fixed after testing)