Remove dead code
Switch deftypes to defrecord