Use prepared statements
Add basic tests