Adds support for passing flags to New()