Use SELECT if to identify the number of images in the DB
Fix a couple of bugs
Add self. to keywords