updated sources controller and javascript fixes