Changed scan topic to be a parameter.