fix js hint errors
add clarifying comment
focus on correct input when modal opens