Change some defines to real constants
Update core