Update opentiles

Cleaned up. global//mains appropriated.