Add revision detection

rev. A = 1
rev. B = 2

Addresses issue #20 and #8.
Space indentation instead of tabs
Merge pull request #22 from githubnemo/master

Add revision detection