A palace with a purpose.