Start abstracting style forms

Fix exception resource leak CID 18304