Add example project with tests

Also add reconnect method to database wrapper and handle connection
automatically