Partial rewrite of the code for the 2014 edition

Many small to medium changes, nearly "iso-features" ;)