Code refactoring.
- Moved SQL operations into own functions.
- Moved VIP operations into own functions.
- Using own sql configuration.