Putting old code back. Merge broke save functionality.