further cleanup / refactor