Changes setInterval interval
Changes thresholds
Changes nexmo call delay
Closes server connections
Removes unnecessary code