Fix null ids after insert, add types listing to DAO