Adding docblock and renaming function
Improving sql queries
Correction in givekarma.php and using appropriate language strings