Added option for silent mode and other fixes.