Refactored lef parser