Add missing setType, add new debug page - not finished yet.