Merge changes from old nanoc (up to 15ea4459)