Imported old code
Merge pull request #1 from randeh/master

Imported old code