Code cleanup, added verbose option