refactoring, separating build functions in opengui