Refact. multi version (more OO-like) + add cli args parsing