Thanks to Hazou for some of the changes...