Fixed critical bug in DB deployment, fixed ILN table, added SQL methods