Merge pull request #5 from sglienke/master

XE compatibility and some cleanup