adjust indents and add a new way to detect resource
Merge pull request #34 from spacewander/master

adjust indents and add a new way to detect resource