Fixes several architectural issues and inconsistencies