general cleanup and data addition