Working mostly

Edge cases and behaviour for neighbourhood density function in general
need some work.