Split security handling into parser and data classes