added several improvements and corrected keyboard navigation