Refactor static parse method