Code consolidation

Moved the four creation methods into one `create()` member. Also fixed
the warnings in MSVC and did some more cleanup.