parseBSMX.py refactoring