Fixes several issues with weight rate shipping

This PR includes a few changes, hopefully chunked into easy to follow commits. 

* A bit of a code spring clean (Not exhaustive)
* Fix an issue where % based rates wouldn't be calculated properly
* Fix an issue where no rate could be save where the weight boundary was 0
* Remove some unused code, variables, globals