General clean up of Core