cleaned up core a little