APP-631 Modifications to the java lib to make it more extendable. Also now supports asynchronous calls.