adding minification process for serialized functions that should be sent to the client side, adding a more centralized debug mode detection.