Change scheme filename number to be 0 padded
minor refactorings