Unify parsing weekday definitions.
Fix incorrect variable name.
Remove debug code.