LPS-40176

cc @csierra
                                                                      
Note: I removed some code from the Java code that is unnecessary now.