Finished DB

Added:
More DB integration
Code cleaning & ordering