Merge pull request #170 from fluke777/master

Cleaning up facts, attributes labels . Covering with tests.
The md object should return itself if passed into the [] method. This should simplify the code. On several places.