Functions files cleanup and adding js