refactor defrecord constructors, fixes #193