Add unit tests and possibly integration tests. A good starting point can be testing the image extraction functionality.