Added basic freeze. Lot of tweeking needed.