diff --git a/lib/main.dart b/lib/main.dart
index 3707b90b0842803143c4a2d90cedb37edab6553a..daf94e81da5e003c5859876b610f41c1defa080e 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -1,6 +1,6 @@
 import 'package:flutter/cupertino.dart';
 import 'package:flutter/material.dart';
-import 'home.dart';
+import 'package:gecko/ui/home.dart';
 import 'package:graphql_flutter/graphql_flutter.dart';
 import 'package:sentry_flutter/sentry_flutter.dart';
 import 'package:flutter/foundation.dart';
diff --git a/lib/ui/historyWallets.dart b/lib/ui/historyElements.dart
similarity index 97%
rename from lib/ui/historyWallets.dart
rename to lib/ui/historyElements.dart
index 219d6d255958582b0ef220bc22f0a17a222be6e2..3c26d83c826fcff19e9373c7d35eecf84f0d514c 100644
--- a/lib/ui/historyWallets.dart
+++ b/lib/ui/historyElements.dart
@@ -18,12 +18,12 @@ import 'package:truncate/truncate.dart';
 //   }
 // }
 
-class HistoryListView extends StatelessWidget {
+class HistoryElements extends StatelessWidget {
   // const String({this.isPubkey});
   // final PubkeyCallBack isPubkey;
   // GlobalKey<MyState> _myKey = GlobalKey();
 
-  const HistoryListView(
+  const HistoryElements(
       {Key key,
       @required ScrollController scrollController,
       @required this.transBC,
diff --git a/lib/home.dart b/lib/ui/historyScreen.dart
similarity index 75%
rename from lib/home.dart
rename to lib/ui/historyScreen.dart
index 13d70e18c4b21b6f3c873119b257977766e15b5b..fc1b912d9e4ae55e9e3ad9cbf2bf9dad71883561 100644
--- a/lib/home.dart
+++ b/lib/ui/historyScreen.dart
@@ -1,62 +1,36 @@
 import 'package:flutter/material.dart';
 import 'package:flutter/foundation.dart';
 import 'package:qrscan/qrscan.dart' as scanner;
-import 'package:gecko/ui/generateWallets.dart';
-import 'package:gecko/ui/historyWallets.dart';
+import 'package:gecko/ui/historyElements.dart';
 import 'dart:async';
 import 'dart:typed_data';
 import 'dart:ui';
 import 'package:graphql_flutter/graphql_flutter.dart';
 import 'package:permission_handler/permission_handler.dart';
-import 'parsingGVA.dart';
-import 'query.dart';
+import 'package:gecko/parsingGVA.dart';
+import 'package:gecko/query.dart';
 import 'package:sentry/sentry.dart' as sentry;
 
-// method to call from widget to fetchmore queries
-typedef FetchMore = dynamic Function(FetchMoreOptions options);
-
-typedef Refetch = Future<QueryResult> Function();
-
-typedef QueryBuilder = Widget Function(
-  QueryResult result, {
-  Refetch refetch,
-  FetchMore fetchMore,
-});
-
 //ignore: must_be_immutable
-class HomeScreen extends StatefulWidget {
-  // const HistoryListScreen({
-  //   final Key key,
-  //   @required this.options,
-  //   @required this.builder,
-  // }) : super(key: key);
-
-  // final QueryOptions options;
-  // final QueryBuilder builder;
-
-  HomeScreen({this.screens});
-
-  static const Tag = "HistoryListScreen";
-  final List<Widget> screens;
+class HistoryScreen extends StatefulWidget {
+  const HistoryScreen({Key keyHistory}) : super(key: keyHistory);
 
   @override
-  _HomeScreenState createState() => _HomeScreenState();
+  State<StatefulWidget> createState() => HistoryScreenState();
 }
 
-class _HomeScreenState extends State<HomeScreen> {
-  int _currentIndex = 0;
+class HistoryScreenState extends State<HistoryScreen> {
+  int currentIndex = 0;
   Widget currentScreen;
 
   void onTabTapped(int index) {
     setState(() {
-      _currentIndex = index;
+      currentIndex = index;
     });
   }
 
   Uint8List bytes = Uint8List(0);
-
   final TextEditingController _outputPubkey = new TextEditingController();
-
   final nRepositories = 20;
 
   // String pubkey = 'D2meevcAHFTS2gQMvmRW5Hzi25jDdikk4nC4u1FkwRaU'; // For debug
@@ -96,53 +70,6 @@ class _HomeScreenState extends State<HomeScreen> {
     print('Build pubkey : ' + pubkey);
     print('Build this.pubkey : ' + this.pubkey);
     print('isBuilding: ' + isBuilding.toString());
-    return MaterialApp(
-        home: Scaffold(
-      backgroundColor: Colors.grey[300],
-      body: SafeArea(
-        child: IndexedStack(
-          index: _currentIndex,
-          children: <Widget>[
-            historyScreen(),
-            GenerateWalletScreen(),
-            //  FriendsScreen()
-          ],
-        ),
-      ),
-      floatingActionButton: Container(
-        height: 80.0,
-        width: 80.0,
-        child: FittedBox(
-          child: FloatingActionButton(
-            onPressed: () => _scan(),
-            child: Container(
-                height: 40.0,
-                width: 40.0,
-                child: Image.asset('images/scanner.png')),
-            backgroundColor: Color.fromARGB(500, 204, 255, 255),
-          ),
-        ),
-      ),
-      bottomNavigationBar: BottomNavigationBar(
-        fixedColor: Colors.black,
-        type: BottomNavigationBarType.fixed,
-        onTap: onTabTapped,
-        currentIndex: _currentIndex,
-        items: [
-          BottomNavigationBarItem(
-            icon: new Icon(Icons.format_list_bulleted),
-            label: 'HOME',
-          ),
-          BottomNavigationBarItem(
-            icon: new Icon(Icons.settings),
-            label: 'GENERATE WALLET',
-          )
-        ],
-      ),
-    ));
-  }
-
-  Widget historyScreen() {
     return Column(children: <Widget>[
       TextField(
           onChanged: (text) {
@@ -256,7 +183,7 @@ class _HomeScreenState extends State<HomeScreen> {
             List _transBC = parseHistory(blockchainTX);
 
             return Expanded(
-              child: HistoryListView(
+              child: HistoryElements(
                   scrollController: _scrollController,
                   transBC: _transBC,
                   historyData: result),
@@ -267,7 +194,7 @@ class _HomeScreenState extends State<HomeScreen> {
     ));
   }
 
-  Future _scan() async {
+  Future scan() async {
     await Permission.camera.request();
     String barcode;
     try {
diff --git a/lib/ui/home.dart b/lib/ui/home.dart
new file mode 100644
index 0000000000000000000000000000000000000000..61ef4e014759081ad16aa1a87e5ef04102c6649c
--- /dev/null
+++ b/lib/ui/home.dart
@@ -0,0 +1,88 @@
+import 'package:flutter/material.dart';
+import 'package:gecko/ui/generateWallets.dart';
+import 'dart:typed_data';
+import 'dart:ui';
+import 'package:gecko/ui/historyScreen.dart';
+
+//ignore: must_be_immutable
+class HomeScreen extends StatefulWidget {
+  // const HistoryListScreen({
+  //   final Key key,
+  //   @required this.options,
+  //   @required this.builder,
+  // }) : super(key: key);
+
+  // final QueryOptions options;
+  // final QueryBuilder builder;
+
+  HomeScreen({this.screens});
+  final List<Widget> screens;
+
+  @override
+  _HomeScreenState createState() => _HomeScreenState();
+}
+
+class _HomeScreenState extends State<HomeScreen> {
+  GlobalKey<HistoryScreenState> _keyHistory = GlobalKey();
+
+  int _currentIndex = 0;
+  Widget currentScreen;
+
+  void onTabTapped(int index) {
+    setState(() {
+      _currentIndex = index;
+    });
+  }
+
+  Uint8List bytes = Uint8List(0);
+
+  @override
+  Widget build(BuildContext context) {
+    return MaterialApp(
+        home: Scaffold(
+      backgroundColor: Colors.grey[300],
+      body: SafeArea(
+        child: IndexedStack(
+          index: _currentIndex,
+          children: <Widget>[
+            HistoryScreen(
+              keyHistory: _keyHistory,
+            ),
+            GenerateWalletScreen(),
+            //  FriendsScreen()
+          ],
+        ),
+      ),
+      floatingActionButton: Container(
+        height: 80.0,
+        width: 80.0,
+        child: FittedBox(
+          child: FloatingActionButton(
+            onPressed: () => _keyHistory.currentState.scan(), // _scan(),
+            child: Container(
+                height: 40.0,
+                width: 40.0,
+                child: Image.asset('images/scanner.png')),
+            backgroundColor: Color.fromARGB(500, 204, 255, 255),
+          ),
+        ),
+      ),
+      bottomNavigationBar: BottomNavigationBar(
+        fixedColor: Colors.black,
+        type: BottomNavigationBarType.fixed,
+        onTap: onTabTapped,
+        currentIndex: _currentIndex,
+        items: [
+          BottomNavigationBarItem(
+            icon: new Icon(Icons.format_list_bulleted),
+            label: 'HOME',
+          ),
+          BottomNavigationBarItem(
+            icon: new Icon(Icons.settings),
+            label: 'GENERATE WALLET',
+          )
+        ],
+      ),
+    ));
+  }
+}