Cleaned up core