Replaced usage monkey-patches to String and Date types with internal functions.