Fixed a couple of bugs, added first AreaPer test.