Bug fix, but code is unused anyway.
Remove old method declarations.
Check the extension is not nil before adding it to the array.
Updated tests because we added more error definitions.