Renamed SPEED to BASE_RATE to avoid a conflict with an included library.