Added new serial library copied from master 19 August 2014.