Better handling of maps in java.