Removed raw SQL query strings

Closes #14