some code cleanup
started on the tool modules