Gnuk support

Hi

This is the redo of Pull Requet #153, with some update based on Viktor and Frank's comments.

This is the log to show that it works http://kopy.io/6wqKd
This looks like a change that could break existing cards...