Made extensions more robust, added wait paramter, removed white-space padding for output