Db clean

These commits
- add the script to clean up the database from the tables which aren't used anymore
- clean the code a little more to get ride of feature we don't use anymore
- fix the display of the Package stats which wasn't working anymore