a little bit of code cleanup and renamings.