Rewritten some architecture