Add Undo

Added undo support and tweaked the layout a bit.

![undo](https://cloud.githubusercontent.com/assets/22635/5065070/c6a1eca0-6e6a-11e4-9502-58ba1f89940d.gif)