Fix possibility of entering '0' for month, some other optimisations.