moved custom ui from inner classes to public classes