More core things and fixes

Moving towards implementing systems. Almost there.