only store cortex.getValue()
cleanup
improve global app state structures