Add changes from devcloud into github from 2013
Adding new features, currently unused.