Simplified code; added styling to formula items.