Added support for custom init methods and parameters.