cleanup, fixes and raw sql removed
Merge pull request #200 from vomikan/master

cleanup, fixes and raw sql removed