Update constructor to handle images