Basic application bits and pieces
Porting from #167