add more configurable softbounce management and do some code cleanup