cleanup and some polish