Changed sample and send intervals and delete unused code