Some python refactoring SpecFile class