initial code cleanup, switch to gtk3