Abstracted out grade parsing into modules (fixes #3)