Bad behavior

I'm sure Norv will want to rewrite this entire thing, but here is my current :frog:  hopefully some of it will be useful