Improvements and fixes all around...

Still needs testing, so be careful.
Updated to include XSP ... must have been sleeping when I updated it last time...