some cleaning up bits