Replaced init methods with polymorphic constructors, fixed #41.