Still some compilation errors.
The main function now compiles, currently writing a post processing step to get rid of
isolated vertices from the background.