Updated to work with shared functions and constants.