Various

I'm pretty sure Ant will kill me for the ugliness of this code, but... heh life is short! :stuck_out_tongue_closed_eyes: