Added some measures, fixed a couple bugs.