adapted JS to entity based dir structure, js settings, latest image getter