Refactored StInstance a bit.