WCP-191 : Cleaned up some JS