general cleanup and some docs