some cleanup in options handling.
pass the options record to the Java backend