update
Complete rewrite from functional to object-oriented
filename error