Porous structure and surface chemistry of nitrogen containing carbons from polymers