Fix compiler warnings

@madskristensen, what was the disabled code for PropertyNames for?
Should it be re-enabled?
Fix typo
Code analysis

Make methods static
Handle failed HRESULTs
Use properties instead of public fields
More detailed error messages
Don't choke on bundle files outside of projects