fix gdx-tests and refactor