Rewrite some Util methods, fix option command