clean up unused code and fix last BG