Updated for better JS loading