Final 2D segmantation algorithm for this sprint

Added comments/documentation and added small features