Very rough refactor to remove jcores please review