Lots of 2013 bug fixes etc.