Modified a lot of stuff here.