Re-did architecture with ideas from KM.