Many small bugfixes to types form