re-worked terminal objects, still needs some refactoring. added flank terminal object.