Replaced energy security coffee script with plain javascript