shunting the frontiers code over to its own file