Print localized weekday names
Refactor various parts of the code