tidycode
cleanup and small improvements