Changed to not use inline JavaScript