Added unit tests. fixed getDataOptions().