Moved db connection out of api.php
Added half life calculation
the highscores will now decrease with time