Fix memory MySQL process leaks.
Add a week day conversion method.