cleanup some dirty source code