Add some infrastructure

Not polished or documented yet