Not complete yet, but I can't get xdebug working, and I'd rather have this commited than not. I'll try and figure this out tomorrow.