Clean up variables

Moved a few variables to core
Re-arranged variables to more consistent grouping