Refactoring input parsing for erasure-demo