dynmaic tank update

Author backported some of the features and bug fixes from the 1.6.2
version