Fixed serialization problems of incrementors and added possibility to register classes for Kryo serialization.