tidy up tanks code