Add img directory and fix a memory leak