Updates for revel

Added a number of updates which allow train to be used with revel.  Not
quite there yet and some might need to be backed out.