Major logic/inheritance fixes