Cleaned up some code

Fixed CallState
Fixed Database
Cleaned up