Changes made to suit non-GUI mode of working.