Some refactoring. Should be some major changes before long.
starting to rework the expect code. god help me.