Various fixes for MDB, still prepping for angular and REST