Merge pull request #5 from timorl/master

Tests with resources now working
Fixed existing bugs