Rewritten the entire architecture part!