Updated tests/specs and codebehind

Please review here: http://mrccodereview.cloudapp.net/ui#review:id=1188