adding js files and partially working auto location for entities