Added tile_cost, added headers to files, moved prime