Modularize parsing