Fixed parsing and setting of functional residues.
Added a bug todo.