Removed database config for second database
Changed code structur for improvements
Changed establish_connection function