Fixed dangerous default values in init
Switched to new-style class