Added local database and revamped to uselocal server