Have AsTarget() return itself for easy instantiation.
Huge update to make the project more Windows-friendly, plus some general refactoring and bug-fixing.
Merge branch 'master' into 5.0