Initial commit. Code taken from sf svn and patched against debug mode enable hack for K10D