refactor gtk widget creations to factories