Factored out inner classes to be lower version xtend-compatible