Make it usable on command line.
Cleaning code.