Put in exits-- this all needs a good clean