Added stop and clear functions.