Removed redundant code attribute

The code attribute didn't serve any purpose (name could be used instead), so I removed it. Additionally I fixed a broken test.