Refactoring python parser
Remove unused code