Fix some software architecture errors