working on fixing tests
All tests running in one run

Some refactoring done to ensure a smooth run
Merge pull request #14 from Slowking770/Adding-Upsert-Method

Fixed tests