Cleaned up karma and made it more generic