 		public function FileSharingService(communications:Communications) 
 		{
 			c = communications;
-			
-			mysqlConnection = new Connection("-.sfxworks.net", 9001, "-", "-", "-");
-			mysqlConnection.connect();
-			mysqlConnection.addEventListener(Event.CONNECT, handleMysqlConnection);
+			c.databaseService.connectToDatabase(SERVICE_NAME);
+			c.databaseService.addEventListener(DatabaseServiceEvent.CONNECTED, handleDatabaseConnection);
 			
 			fileSharingInfo = File.applicationStorageDirectory.resolvePath("services" + File.separator + "filesharingservice" + File.separator + "infoE");
 			

package sfxworks.services 
{
	import by.blooddy.crypto.MD5; //Awesome guy
	import com.maclema.mysql.Connection;
	import com.maclema.mysql.MySqlToken;
	import com.maclema.mysql.ResultSet;
	import com.maclema.mysql.Statement;
	import flash.events.Event;
	import flash.events.EventDispatcher;
	import flash.filesystem.File;

	{
		//Fetch public file listing from mysqldb
		private var c:Communications;
		private var fileSharingInfo:File;
		
		private var _filePaths:Vector.<String>;
