Let there be light!

it's late and this works, I'm not gonna bother removing all the
spaghetti code I threw in to get it to work.