Improving the SQLite Database Layer

Fixing a values name bugs.
Improving and finishing the implementation of the Database and Business
Layer.