Changed some important functions