Core: Some cleanup