first pass of cleaning, deleted gui related stuff