Turned parsing/generation into static methods