Move controller functions out of the social builder. Add support for
tagging capsules with a type so the social builder can use them.