Okay, some working code now.