$vocabulary seems to cause PHP cough, $voc works fine. Also adding CSS for new image preview div.