Fix bugs. Revision saving and viewing working now.