Path to img folder can now be passed as an option. Updated var names to sensible names