tons of refactoing and bugfixing. added vertex and its neighbours (without tests)