Initial model setup and controllers copied from old code