Completely re-wrote subdivision, now using half edge structure