Refactor style extraction functions