Month and year now update correctly

Also optimalized the code a little.