Added neighbor count function, generategrid function and styling