refactor parser code
initial refactor of featurization
pass filename to parser instead of stream
minor cleanup