move types to admin module and fix tests