Build target for tools and some more code cleanup.