Refactored and fixed bold and italic text