Some footfall pre-processing script refactoring