Added preferences dialog. Minor updates.