Added discretisation of offsets based on subdivisions of length
Added some debug messages
Added a method to get the current ID counter for saving/loading purposes