diff --git a/README.md b/README.md
index 709b9a666cfc59a5f4ccaff60cd16599a714e1e6..b033a30410705a742f4498310bac635e1bce73c6 100644
--- a/README.md
+++ b/README.md
@@ -1,50 +1,20 @@
 # PROG2900
 
-## Database setup
-This project requires the use of MongoDB. To use the application, a MongoDB Atlas database must first be set up and configured. The following is a step by step guide of how to set up the database:
-1. Create a user/Log into MongoDB Atlas (https://www.mongodb.com/atlas)
-2. ?Create an organization?
-3. On the left-hand side in the menu under "Organization", press the "Project" tab.
+## Dependencies
+### Python
+To run the server...
 
-![Alt text](images/image-1.png)
+### Dart & Flutter
 
-4. In the right-hand corner, press "New Project" and name it as you wish. 
 
-![Alt text](images/image-2.png)
+### Database
+This project requires SQLite3. Download the precompiled binary for your operating system. 
+Precompiled binaries can be found on https://www.sqlite.org/download.html. Extract the downloaded
+binary in a folder and note its path. Add the path to your system environment variables. Now you can 
+manage the SQLite database.
 
-5. After successful creation, you should be taken to a page called "Overview". In the middle of the page right below "Create a deployment", press the button that says "+ Create"
+## Endpoints
 
-![Alt text](images/image.png)
+## Bugs
 
-6. When creating a database deployment, select the M10 template. The provider and region can be selected as is most fit to the organization.
-
-![Alt text](images/image-4.png)
-
-7. Name your cluster appropriately. Optionally, give your cluster tags. Press "Create".
-
-![Alt text](images/image-5.png)
-
-8. After deploying the database you will be taken to the Security Quickstart page. Choose the option "certificate", and chose an appropriate "Common Name". Toggle the "Download certificate when user is added" on, and select a certificate expiration. Then press the "Add User" button.
-
-![Alt text](images/image-7.png)
-
-9. After pressing "Add User", the access certificate will automatically be downloaded to your PC. The certificate will be used to access your database, and should be kept in a safe location to prevent unauthorized access. 
-
-![Alt text](images/image-8.png)
-
-10. Still in the Security Quickstart page, scroll down to the "Where would you like to connect from?" section. Press "Add My Current IP Address", and then press "Finish and close" at the bottom of the page.
-
-![Alt text](images/image-9.png)
-
-![Alt text](images/image-10.png)
-
-11. You have now created a database deployment, but you will still have to configure the connection to the database. 
-
-### Database connection
-1. To create a connection with the database, locate your newly created database deployment and press "Connect"
-
-![alt text](images/image-11.png)
-
-2. Select "Drivers"
-
-![alt text](images/image-12.png)
\ No newline at end of file
+## Developers
diff --git a/app/lib/main.dart b/app/lib/main.dart
index 506c846b8a8c16abc209e8883f05e57c1e5c5997..5bce45213d8ec5a75387d38279491c1a69d78904 100644
--- a/app/lib/main.dart
+++ b/app/lib/main.dart
@@ -11,7 +11,7 @@ class MyApp extends StatelessWidget {
   @override
   Widget build(BuildContext context) {
     return const MaterialApp(
-      home: const DefaultPage(),
+      home: DefaultPage(),
     );
   }
 }
diff --git a/app/lib/pages/consts.dart b/app/lib/pages/consts.dart
index c1e12101b57db4fd10d403c9067b1c0b0b099682..d902d50febc23e4e0dd4893332e976559da9e9fe 100644
--- a/app/lib/pages/consts.dart
+++ b/app/lib/pages/consts.dart
@@ -23,12 +23,13 @@ final titleStyle = GoogleFonts.dmSans(
   color: textColor,
   fontWeight: FontWeight.bold, // Add this line to make the text bold
 );
-final regTextStyle = GoogleFonts.dmSans(fontSize: 20, color: textColor);
+final regTextStyle = GoogleFonts.dmSans(fontSize: 19, color: textColor);
 final chartTextStyle = GoogleFonts.dmSans(fontSize: 14, color: textColor);
+final subHeadingStyle = GoogleFonts.dmSans(fontSize: 22, color: textColor, fontWeight: FontWeight.bold);
 
 // Colors
-const mediumBlue = Color(0xFF015E8F);
-const darkBlue = Color(0xFF00B4D8);
+const darkBlue = Color(0xFF015E8F);
+const teal = Color(0xFF00B4D8);
 const darkestBlue = Color(0xFF03045E);
 const lightBlue = Color(0xFFCAF0F8);
 const superLightBlue = Color(0xFFCAF0F8);
diff --git a/app/lib/pages/default_page.dart b/app/lib/pages/default_page.dart
index 433d223fdc2e2e9ce4980e572df55315a5965e9c..29ad2d9127f2da80d73bc9fdec7cd5b29f16e7cc 100644
--- a/app/lib/pages/default_page.dart
+++ b/app/lib/pages/default_page.dart
@@ -14,6 +14,7 @@ class DefaultPage extends StatefulWidget {
 
 class _DefaultPageState extends State<DefaultPage> {
   late Timer _timer;
+  bool showBar = false;
 
   List<Measurement> markerList = [];
 
@@ -30,14 +31,14 @@ class _DefaultPageState extends State<DefaultPage> {
         context: context,
         builder: (BuildContext context) {
           return AlertDialog(
-            title: Text("Error"),
+            title: const Text("Error"),
             content: Text(e.toString()),
             actions: [
               TextButton(
                 onPressed: () {
                   Navigator.of(context).pop();
                 },
-                child: Text("OK"),
+                child: const Text("OK"),
               ),
             ],
           );
@@ -83,6 +84,14 @@ class _DefaultPageState extends State<DefaultPage> {
           backgroundColor: Colors.transparent,
           appBar: AppBar(
             title: const Text('IceMap'),
+            actions: [
+              IconButton(
+                icon: const Icon(Icons.search),
+                onPressed: () {
+                  showBar = !showBar;
+                },
+              ),
+            ],
           ),
           body: ListView(
             children: [ // Add main widget
diff --git a/app/lib/pages/marker_handler/get_markers.dart b/app/lib/pages/marker_handler/get_markers.dart
index ebc50274eef2ba7278b48028a13a2132150a0b79..702d41458a19f878d878bf46469e20481ed4db8d 100644
--- a/app/lib/pages/marker_handler/get_markers.dart
+++ b/app/lib/pages/marker_handler/get_markers.dart
@@ -7,25 +7,36 @@ import 'marker_data.dart';
 // fetchMarkerTemplate requests all marker data from the server
 Future<List<Measurement>> fetchMarkerData() async {
   try {
+    // Custom HTTP client
     HttpClient client = HttpClient()
-      ..badCertificateCallback = (X509Certificate cert, String host, int port) => true;
+      ..badCertificateCallback = // NB: temporary disable SSL certificate validation
+          (X509Certificate cert, String host, int port) => true;
 
+    // Request markers from API
     var request = await client.getUrl(Uri.parse(serverURI + mapEndpoint));
-    var response = await request.close();
+    var response = await request.close(); // Close response body at end of function
 
+    // Parse body to JSON if request is ok
     if (response.statusCode == 200) {
       var responseBody = await response.transform(utf8.decoder).join();
 
-      List<dynamic> jsonData = json.decode(responseBody);
-
-      return jsonData.map((data) => Measurement.Measurement(data)).toList();
+      if (responseBody.isNotEmpty) {
+        var jsonData = json.decode(responseBody);
 
+        if (jsonData != null && jsonData is List) { // Check if jsonData is not null and is a List
+          return jsonData.map((data) => Measurement.Measurement(data)).toList();
+        } else {
+          throw Exception('Failed to parse marker data: Unexpected response format');
+        }
+      } else {
+        throw Exception('Failed to parse marker data: Empty response body');
+      }
     } else {
-      print('Request failed with status: ${response.statusCode}');
-      throw Exception('Failed to parse marker data');
+      throw Exception('Failed to fetch marker data: Status code ${response.statusCode}');
     }
   } catch (e) {
-    print('Error: $e');
-    throw Exception('failed to connect to the server. Please check your network connection');
+    print('Error fetching marker data: $e');
+    throw Exception('Failed to fetch marker data: ${e.toString()}');
   }
 }
+
diff --git a/app/lib/pages/marker_handler/marker_data.dart b/app/lib/pages/marker_handler/marker_data.dart
index fe0d4060750cbceda42eac2f964a07d34482cec9..fd466ed890e293cb2f3a4cffeea9edbfe47b3e77 100644
--- a/app/lib/pages/marker_handler/marker_data.dart
+++ b/app/lib/pages/marker_handler/marker_data.dart
@@ -1,6 +1,8 @@
+import 'dart:core';
+
 class Measurement {
   int measurementID;
-  int timeMeasured;
+  DateTime timeMeasured;
   Sensor sensor;
   List<Data> dataList;
   List<Corner> cornerList;
@@ -18,15 +20,24 @@ class Measurement {
   factory Measurement.Measurement(Map<String, dynamic> json) {
     return Measurement(
       measurementID: json['MeasurementID'],
-      timeMeasured: json['TimeMeasured'],
+      timeMeasured: DateTime.parse(json['TimeMeasured']),
       sensor: Sensor.fromJson(json['Sensor']),
       dataList: (json['Data'] as List<dynamic>)
           .map((data) => Data.fromJson(data))
           .toList(),
-      cornerList: (json['Corner'] as List<dynamic>)
+      cornerList: (json['Corners'] as List<dynamic>)
           .map((data) => Corner.fromJson(data))
           .toList(),
-      bodyOfWater: json['WaterBodyName'],
+      bodyOfWater: json['BodyOfWater'],
+      /*
+            dataList: (json['Data'] != null && json['Data'] is List)
+          ? (json['Data'] as List<dynamic>).map((data) => Data.fromJson(data)).toList()
+          : [],
+      cornerList: (json['Corner'] != null && json['Corner'] is List)
+          ? (json['Corner'] as List<dynamic>).map((data) => Corner.fromJson(data)).toList()
+          : [],
+      bodyOfWater: json['WaterBodyName'] ?? '',
+      */
     );
   }
 }
@@ -81,7 +92,7 @@ class Data {
 }
 
 class Corner {
-  double cornerID;
+  int cornerID;
   double latitude;
   double longitude;
 
@@ -94,8 +105,8 @@ class Corner {
   factory Corner.fromJson(Map<String, dynamic> json) {
     return Corner(
       cornerID: json['CornerID'],
-      latitude: json['CornerLatitude'],
-      longitude: json['CornerLongitude'],
+      latitude: json['Latitude'],
+      longitude: json['Longitude'],
     );
   }
 }
\ No newline at end of file
diff --git a/app/lib/pages/widgets/map_widget.dart b/app/lib/pages/widgets/map_widget.dart
index dc92f6de4dedc21ec21b654b1a911fab13e9a952..ebb7521cb3626edfd9c3c06d2b3c5335c07808a7 100644
--- a/app/lib/pages/widgets/map_widget.dart
+++ b/app/lib/pages/widgets/map_widget.dart
@@ -1,12 +1,15 @@
 import 'package:flutter/material.dart';
 import '../marker_handler/marker_data.dart';
 import '../consts.dart';
-import 'package:flutter_map/flutter_map.dart';
-import 'package:latlong2/latlong.dart';
-import 'package:fl_chart/fl_chart.dart';
 import 'quick_view_chart.dart';
 import 'stat_charts.dart';
+import 'sat_layer.dart';
+import 'package:flutter_map/flutter_map.dart';
+import 'package:latlong2/latlong.dart';
+
 
+/// MapContainerWidget is the main widget that contains the map with all
+/// its layers, polygons and markers.
 class MapContainerWidget extends StatefulWidget {
   final List<Measurement> markerList;
 
@@ -18,11 +21,22 @@ class MapContainerWidget extends StatefulWidget {
 
 class _MapContainerWidgetState extends State<MapContainerWidget> {
 
-  Measurement? selectedMarker;
-  bool isMinimized = true; // Quick view box state tacker
+  Measurement? selectedMarker;  // Containing data for selected marker
+  bool isMinimized = true;      // Quick view box state tacker
+  bool satLayer = false;        // Satellite layer visibility tracker
+  bool isTapped = false;        // Button tap state tracker
+  final MapController _mapController = MapController(); // Map controller to re-center map view
+
+
+  // recenterMap moves the map back to its initial view
+  void recenterMap() {
+    _mapController.move(mapCenter, 9.0);
+  }
 
   @override
   Widget build(BuildContext context) {
+    // Initialise selectedMarker to first element in markerList
+    selectedMarker ??= widget.markerList[0];
 
     const double contPadding = 30; // Container padding space
 
@@ -34,43 +48,101 @@ class _MapContainerWidgetState extends State<MapContainerWidget> {
         return Column(
           children: [
             const SizedBox(height: contPadding),
+            /*if (true) NB: add search bar
+              const SearchBar(),
+              const SizedBox(height: contPadding),*/
             ClipRRect(
               borderRadius: BorderRadius.circular(20),
-              child: Stack( // Stack quick view on top of map
+              child: Stack( // Stack of quick view, map layer, satellite layer, and buttons
                 children: [
                   SizedBox(
                     width: screenWidth * boxWidth,
                     height: screenWidth * boxHeight,
                     child: FlutterMap(
                       options: MapOptions(
-                        center: mapCenter, // From consts
+                        center: mapCenter,
                         zoom: 9.0,
                       ),
+                      mapController: _mapController,
                       children: [
-                        TileLayer( // Map from OpenStreetMap
+                        TileLayer(
                           urlTemplate: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
                           subdomains: const ['a', 'b', 'c'],
                         ),
-                        PolygonLayer( // Map each element in markerList to Measurement object
+                        PolygonLayer(
                           polygons: widget.markerList.map((Measurement measurement) {
+                            // Map corners to a list of LatLng objects
+                            List<LatLng> points = measurement.cornerList.map((Corner corner) {
+                              return LatLng(corner.latitude, corner.longitude);
+                            }).toList();
+
                             return Polygon(
-                              points: measurement.cornerList.map((Corner corner) {
-                                // Map corners to LatLng objects
-                                return LatLng(corner.latitude, corner.longitude);
-                              }).toList(),
-                              /*onTap: () {
-                                setState(() {
-                                  selectedMarker = measurement;
-                                });
-                              },*/
-                              color: Colors.blue,
+                              points: points, // Use list of corner coordinates to render polygon
+                              color: Colors.blue.withOpacity(0.5),
                               isFilled: true,
                             );
                           }).toList(),
-                        )
+                        ),
+                        MarkerLayer(
+                          markers: widget.markerList.map((Measurement measurement) {
+
+                            List<LatLng> corners = measurement.cornerList.map((Corner corner) {
+                              return LatLng(corner.latitude, corner.longitude);
+                            }).toList();
+
+                            // point calculates the middle point between corners
+                            LatLng point(List<LatLng> coordinates) {
+                              double averageLatitude = 0.0;
+                              double averageLongitude = 0.0;
+
+                              for (LatLng point in coordinates) {
+                                averageLatitude += point.latitude;
+                                averageLongitude += point.longitude;
+                              }
+
+                              // Calculate average latitude and longitude
+                              averageLatitude /= coordinates.length;
+                              averageLongitude /= coordinates.length;
+
+                              return LatLng(averageLatitude, averageLongitude); // Return the middle point
+                            }
+
+                            return Marker(
+                              width: 50,
+                              height: 50,
+                              point: point(corners),
+                              builder: (ctx) => GestureDetector(
+                                onTap: () {
+                                  setState(() {
+                                    selectedMarker = measurement;
+                                  });
+                                },
+                                child: const Icon(
+                                  Icons.severe_cold,
+                                  color: Colors.blue,
+                                  size: 30.0,
+                                ),
+                              ),
+                            );
+                          }).toList(),
+                        ),
+
                       ],
                     ),
                   ),
+                  /*SizedBox(
+                    width: screenWidth * boxWidth,
+                    height: screenWidth * boxHeight,
+                    child: Stack(
+                      children: [
+                        SatLayer(markerList: widget.markerList), // Satellite layer
+                        Visibility(
+                          visible: satLayer, // Only show layer if satellite button is toggled on
+                          child: SatLayer(markerList: widget.markerList),
+                        ),
+                      ],
+                    ),
+                  ),*/
                   Positioned( // Quick view box layered over map
                     bottom: 10,
                     right: 10,
@@ -82,7 +154,7 @@ class _MapContainerWidgetState extends State<MapContainerWidget> {
                         color: Colors.blue.withOpacity(0.7),
                         child: Stack(
                           children: [
-                            Visibility( // Content only visible when box is maximized
+                            Visibility( // Graph only visible when box is maximized and a marker is selected
                               visible: !isMinimized && selectedMarker != null,
                               child: Center(
                                 child: Padding(
@@ -90,7 +162,7 @@ class _MapContainerWidgetState extends State<MapContainerWidget> {
                                   child: SizedBox(
                                     width: (screenWidth * boxWidth) / 2.3,
                                     height: (screenWidth * boxWidth) / 2.3,
-                                    child: const QuickViewChart(),
+                                    child: const QuickViewChart(), // Quick view graph
                                   ),
                                 ),
                               ),
@@ -112,13 +184,62 @@ class _MapContainerWidgetState extends State<MapContainerWidget> {
                       ),
                     ),
                   ),
+                  Positioned( // Satellite button
+                    top: 10,
+                    right: 10,
+                    child: GestureDetector(
+                      onTap: () {
+                        setState(() {
+                          satLayer = !satLayer; // Toggle satellite layer state on press
+                        });
+                      },
+                      child: Container(
+                        padding: const EdgeInsets.all(8),
+                        decoration: satLayer ? const BoxDecoration( // Add decoration only when pressed
+                          shape: BoxShape.circle,
+                          color: Colors.blue,
+                        ) : null,
+                        child: const Icon(Icons.satellite_alt_outlined),
+                      ),
+                    ),
+                  ),
+                  Positioned( // Back to center button
+                    top: 45,
+                    right: 10,
+                    child: GestureDetector(
+                      onTapDown: (_) {
+                        setState(() {
+                          recenterMap(); // Reset map view
+                          isTapped = true;
+                        });
+                      },
+                      onTapUp: (_) {
+                        setState(() {
+                          isTapped = false;
+                        });
+                      },
+                      onTapCancel: () {
+                        setState(() {
+                          isTapped = false;
+                        });
+                      },
+                      child: Container(
+                        padding: const EdgeInsets.all(8),
+                        decoration: isTapped ? const BoxDecoration( // Add decoration only when pressed
+                          shape: BoxShape.circle,
+                          color: Colors.blue,
+                        ) : null,
+                        child: const Icon(Icons.settings_backup_restore),
+                      ),
+                    ),
+                  ),
                 ],
               ),
             ),
             const SizedBox(height: contPadding), // Padding between containers
             ClipRRect(
               borderRadius: BorderRadius.circular(20),
-              child: Container(
+              child: SizedBox(
                 width: screenWidth * boxWidth,
                 height: screenWidth * boxHeight * 1.5, // NB: make dynamic
                 child: Align(
@@ -132,12 +253,22 @@ class _MapContainerWidgetState extends State<MapContainerWidget> {
                           'Ice stats',
                           style: titleStyle,
                         ),
+                        const Divider(),
                         Text(
-                          'Time of measurement: ${selectedMarker?.timeMeasured}',
+                          'Time of measurement',
+                          style: subHeadingStyle,
+                        ),
+                        Text(
+                          'Date ${(selectedMarker?.timeMeasured.day ?? '-')}/${(selectedMarker?.timeMeasured.month ?? '-')}/${(selectedMarker?.timeMeasured.year ?? '-')}',
+                          style: regTextStyle,
+                        ),
+                        Text(
+                          'Time: ${selectedMarker?.timeMeasured.hour}:00',
                           style: regTextStyle,
                         ),
+                        const SizedBox(height: contPadding),
                         Text(
-                          'Location: (placeholder, placeholder)',
+                          'Measuring point: (${selectedMarker?.dataList[0].latitude}, ${selectedMarker?.dataList[0].latitude})',
                           style: regTextStyle,
                         ),
                         const SizedBox(height: contPadding),
diff --git a/app/lib/pages/widgets/osm_map.dart b/app/lib/pages/widgets/osm_map.dart
new file mode 100644
index 0000000000000000000000000000000000000000..9324c2bb80fec1d940b0b155e125c8ecf30c67c0
--- /dev/null
+++ b/app/lib/pages/widgets/osm_map.dart
@@ -0,0 +1,38 @@
+import 'package:flutter/material.dart';
+import '../marker_handler/marker_data.dart';
+import '../consts.dart';
+import 'package:flutter_map/flutter_map.dart';
+import 'package:latlong2/latlong.dart';
+
+class OSMmap extends StatelessWidget {
+  final List<Measurement> markerList;
+
+  const OSMmap({
+    Key? key,
+    required this.markerList,
+  }) : super(key: key);
+
+  @override
+  Widget build(BuildContext context) {
+    // Init list of polygons
+    List<Polygon> polygons = [];
+
+    // Map each element from markerList to a measurement object
+
+    return FlutterMap(
+      options: MapOptions(
+        center: mapCenter,
+        zoom: 9.0,
+      ),
+      children: [
+        TileLayer(
+          urlTemplate: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
+          subdomains: const ['a', 'b', 'c'],
+        ),
+        PolygonLayer(
+          polygons: polygons, // Return map with list of polygons included
+        ),
+      ],
+    );
+  }
+}
diff --git a/app/lib/pages/widgets/sat_layer.dart b/app/lib/pages/widgets/sat_layer.dart
new file mode 100644
index 0000000000000000000000000000000000000000..107bf1c9076a3fe18dabf0c43c2069a58462204b
--- /dev/null
+++ b/app/lib/pages/widgets/sat_layer.dart
@@ -0,0 +1,29 @@
+import 'package:flutter/material.dart';
+import '../marker_handler/marker_data.dart';
+import 'package:flutter_map/flutter_map.dart';
+import 'package:latlong2/latlong.dart';
+
+class SatLayer extends StatelessWidget {
+  final List<Measurement> markerList;
+
+  const SatLayer({
+    Key? key,
+    required this.markerList,
+  }) : super(key: key);
+
+  @override
+  Widget build(BuildContext context) {
+    return FlutterMap(
+      options: MapOptions(
+        center: LatLng(60.7666, 10.8471),
+        zoom: 9.0,
+      ),
+      children: [
+        TileLayer( // Map from OpenStreetMap
+          urlTemplate: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
+          subdomains: const ['a', 'b', 'c'],
+        ),
+      ],
+    );
+  }
+}
diff --git a/app/pubspec.yaml b/app/pubspec.yaml
index 804a5c15088dae9fee3ee156fa422909328c5ec6..1338bfd8faaee58835f502321a25e43dde35da38 100644
--- a/app/pubspec.yaml
+++ b/app/pubspec.yaml
@@ -16,8 +16,6 @@ dependencies:
   fl_chart: ^0.20.0-nullsafety1
   google_fonts: any
 
-
-
 dev_dependencies:
   flutter_test:
     sdk: flutter
diff --git a/images/image-1.png b/images/image-1.png
deleted file mode 100644
index 4a01edda1b1b0624db6bc0bfa067d187cda7544d..0000000000000000000000000000000000000000
Binary files a/images/image-1.png and /dev/null differ
diff --git a/images/image-10.png b/images/image-10.png
deleted file mode 100644
index 74a20ec788593028d6aeafab58e39e08d3197f3a..0000000000000000000000000000000000000000
Binary files a/images/image-10.png and /dev/null differ
diff --git a/images/image-11.png b/images/image-11.png
deleted file mode 100644
index 8ecd4ac7e1395a76620f9aaca863c40e8fcec1c3..0000000000000000000000000000000000000000
Binary files a/images/image-11.png and /dev/null differ
diff --git a/images/image-12.png b/images/image-12.png
deleted file mode 100644
index e37a41e9e6c2e8a707dd138dc758db14acb0f783..0000000000000000000000000000000000000000
Binary files a/images/image-12.png and /dev/null differ
diff --git a/images/image-2.png b/images/image-2.png
deleted file mode 100644
index ef5e7c891df03b5b346631bb9026f67374cceb03..0000000000000000000000000000000000000000
Binary files a/images/image-2.png and /dev/null differ
diff --git a/images/image-3.png b/images/image-3.png
deleted file mode 100644
index 75c4259c2d093959cfacd40abaf28135b767ba42..0000000000000000000000000000000000000000
Binary files a/images/image-3.png and /dev/null differ
diff --git a/images/image-4.png b/images/image-4.png
deleted file mode 100644
index aba6cbcf1d59db141118ebf4e996782ea506f6cb..0000000000000000000000000000000000000000
Binary files a/images/image-4.png and /dev/null differ
diff --git a/images/image-5.png b/images/image-5.png
deleted file mode 100644
index 32b4cbbe9adf893879521b95cd0684f70c7b554f..0000000000000000000000000000000000000000
Binary files a/images/image-5.png and /dev/null differ
diff --git a/images/image-6.png b/images/image-6.png
deleted file mode 100644
index 639d2e7a538e5483b1331dc4e6ca8b7163248995..0000000000000000000000000000000000000000
Binary files a/images/image-6.png and /dev/null differ
diff --git a/images/image-7.png b/images/image-7.png
deleted file mode 100644
index d75d8313fb384adb26df0accd2fa4554573657c8..0000000000000000000000000000000000000000
Binary files a/images/image-7.png and /dev/null differ
diff --git a/images/image-8.png b/images/image-8.png
deleted file mode 100644
index 3b81d810090e75499b1055c308c7b55d47075179..0000000000000000000000000000000000000000
Binary files a/images/image-8.png and /dev/null differ
diff --git a/images/image-9.png b/images/image-9.png
deleted file mode 100644
index 79c53a4381985e84bf4e4aff560c68ff054915f8..0000000000000000000000000000000000000000
Binary files a/images/image-9.png and /dev/null differ
diff --git a/images/image.png b/images/image.png
deleted file mode 100644
index 847917d85ceaf24ded183cfb356e56f449fb487c..0000000000000000000000000000000000000000
Binary files a/images/image.png and /dev/null differ
diff --git a/server/APIs/__pycache__/get_weather.cpython-311.pyc b/server/APIs/__pycache__/get_weather.cpython-311.pyc
index c48ae510b8dcd144dfcf8a877ec949cbd66f1107..4efcc88c6050e6cb91118c0e1bb170950b6e7797 100644
Binary files a/server/APIs/__pycache__/get_weather.cpython-311.pyc and b/server/APIs/__pycache__/get_weather.cpython-311.pyc differ
diff --git a/server/APIs/get_weather.py b/server/APIs/get_weather.py
index 89b9997a94ffd9d012c0ace27371e1f64cf7eebb..37e76451af99392bc03592a8f6b2a96cfa2c682b 100644
--- a/server/APIs/get_weather.py
+++ b/server/APIs/get_weather.py
@@ -76,9 +76,9 @@ def get_weather(self):
                     weather_data.append(weather_object)
                     break
 
-
         else:  # Add error message if no weather data is found or the request fails
-            print(f"Request to weather API failed with status code {response.status_code}") #NB: append error message to weather_data
+            print(
+                f"Request to weather API failed with status code {response.status_code}")  # NB: append error message to weather_data
             status_code = response.status_code
 
     # Set headers
diff --git a/server/main.py b/server/main.py
index 47d94aadead3156f2108379051b2eed001b05dab..d5ed93ee1e3635059ca10aad893ccfcc9af65cdf 100644
--- a/server/main.py
+++ b/server/main.py
@@ -28,7 +28,7 @@ class IceHTTP(BaseHTTPRequestHandler):
 
     def do_GET(self):
         # Root path
-        if self.path == '/': # NB: temporary root path behavior
+        if self.path == '/':  # NB: temporary root path behavior
             self.send_response(200)
             self.send_header("Content-type", "text/plain")
             self.end_headers()
@@ -36,15 +36,17 @@ class IceHTTP(BaseHTTPRequestHandler):
             self.wfile.write(b"Root path hit!")
 
         elif self.path == '/update_map':  # NB: should be POST?
-            get_all_markers(self, self.cursor, False)   # Get all markers
-
+            get_all_markers(self, self.cursor, False, 'Mjosa')  # Get all markers
+            # NB: temporary hardcoded waterBodyName
         elif self.path == '/get_valid_markers':  # NB: should be POST?
-            get_all_markers(self, self.cursor, True)  # Get only valid markers
+            get_all_markers(self, self.cursor, True, 'Mjosa')  # Get only valid markers
+            # NB: temporary hardcoded waterBodyName
 
     def do_POST(self):
         if self.path == '/get_weather_data':
             get_weather(self)
 
+
 # Terminate server on key press q
 def on_key_press(server, event, cursor, conn):
     if event.name == 'q':
diff --git a/server/map/__pycache__/get_markers.cpython-311.pyc b/server/map/__pycache__/get_markers.cpython-311.pyc
index 46facb818c457bb01157ffbd7d0c285473aad2e6..7dbac2b7ec9e41b54e8502402b73e37c0dd244fc 100644
Binary files a/server/map/__pycache__/get_markers.cpython-311.pyc and b/server/map/__pycache__/get_markers.cpython-311.pyc differ
diff --git a/server/map/__pycache__/get_sat_query.cpython-311.pyc b/server/map/__pycache__/get_sat_query.cpython-311.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..1f905358a99ee725129c808f8305930a2effa62c
Binary files /dev/null and b/server/map/__pycache__/get_sat_query.cpython-311.pyc differ
diff --git a/server/map/add_new_water_body.py b/server/map/add_new_water_body.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/server/map/get_markers.py b/server/map/get_markers.py
index 45f8965e5a9779ac3539d375232ff5b5f3dfa8c6..48ce0673ae784d89649013246a802d65c874d6c5 100644
--- a/server/map/get_markers.py
+++ b/server/map/get_markers.py
@@ -3,85 +3,71 @@ import json
 
 # get_markers requests all marker data or valid markers, converts the data to json, and writes
 # the data to the response object
-def get_all_markers(self, cursor, valid: bool):
+def get_all_markers(self, cursor, valid: bool, waterBodyName):
     try:
-        # NB: interval temporarily hard coded to 5 days
-        if valid:
-            cursor.execute('''
-                SELECT m.MeasurementID, m.SensorID, m.TimeMeasured, d.Latitude, d.Longitude,
-                       d.IceTop, d.IceBottom, d.CalculatedThickness, d.Accuracy, s.SensorType, s.Active,
-                       c.CornerID, c.CornerLatitude, c.CornerLongitude, b.Name
-                FROM Measurement m
-                INNER JOIN Sensor s ON m.SensorID = s.SensorID
-                INNER JOIN Data d ON m.MeasurementID = d.MeasurementID
-                LEFT JOIN Corner c ON m.MeasurementID = c.MeasurementID
-                INNER JOIN BodyOfWater b ON m.WaterBodyName = b.Name
-                WHERE m.TimeMeasured > DATE_SUB(NOW(), INTERVAL 5 DAY);
-            ''')
-        else:
-            cursor.execute('''
-                SELECT m.MeasurementID, m.SensorID, m.TimeMeasured, d.Latitude, d.Longitude,
-                       d.IceTop, d.IceBottom, d.CalculatedThickness, d.Accuracy, s.SensorType, s.Active,
-                       c.CornerID, c.CornerLatitude, c.CornerLongitude, b.Name
-                FROM Measurement m
-                INNER JOIN Sensor s ON m.SensorID = s.SensorID
-                INNER JOIN Data d ON m.MeasurementID = d.MeasurementID
-                LEFT JOIN Corner c ON m.MeasurementID = c.MeasurementID
-                INNER JOIN BodyOfWater b ON m.WaterBodyName = b.Name
-            ''')
+        sql_query = '''
+            SELECT m.MeasurementID, m.SensorID, m.TimeMeasured, 
+                   s.SensorType, s.Active, 
+                   b.Name,
+                   d.SubDivisionID, d.GroupID, d.MinimumThickness, 
+                   d.AverageThickness, d.CenterLatitude, d.CenterLongitude, 
+                   d.Accuracy
+            FROM Measurement m
+            INNER JOIN Sensor s ON m.SensorID = s.SensorID
+            INNER JOIN BodyOfWater b ON m.WaterBodyName = b.Name
+            LEFT JOIN SubDivision d ON m.MeasurementID = d.MeasurementID
+            WHERE b.Name = 'Mjosa'
+        '''
+
+        if valid:  # Append time restriction to WHERE statement, NB temporarily hardcoded to 5 days
+            sql_query += ' AND m.TimeMeasured > DATE_SUB(NOW(), INTERVAL 5 DAY)'
+
+        cursor.execute(sql_query)
 
         rows = cursor.fetchall()
 
+        # Container for all fetched measurement objects
         measurement_data = {}
 
-        # Iterate over the fetched rows
+        # Iterate over all fetched rows
         for row in rows:
             measurement_id = row[0]
 
-            # Create a data object for current row
-            data_object = {
-                'Latitude': row[3],
-                'Longitude': row[4],
-                'IceTop': row[5],
-                'IceBottom': row[6],
-                'CalculatedThickness': row[7],
-                'Accuracy': row[8]
-            }
-
-            # Create a corner object for current row
-            corner_object = {
-                'Latitude': row[12],
-                'Longitude': row[13]
+            # Create subdivision new object
+            sub_division = {
+                'SubdivID': row[6],
+                'GroupID': row[7],
+                'MinThickness': row[8],
+                'AvgThickness': row[9],
+                'CenLatitude': row[10],
+                'CenLongitude': row[11],
+                'Accuracy': row[12]
             }
 
             # Check if measurement ID already exists in measurement_data
             if measurement_id in measurement_data:
                 # Check if the data object already exists in the list
-                if data_object not in measurement_data[measurement_id]['Data']:
-                    measurement_data[measurement_id]['Data'].append(data_object)
+                if sub_division not in measurement_data[measurement_id]['Subdivisions']:
+                    measurement_data[measurement_id]['Subdivisions'].append(sub_division)
 
-                # Check if the corner object already exists in the list
-                if corner_object not in measurement_data[measurement_id]['Corners']:
-                    measurement_data[measurement_id]['Corners'].append(corner_object)
             else:
                 # Create a new entry for measurement_id if it does not already exist in the list
                 measurement_data[measurement_id] = {
                     'MeasurementID': measurement_id,
                     'TimeMeasured': row[2],
-                    'Sensor': {
+                    'Sensor': {  # Each measurement only has one related sensor
                         'SensorID': row[1],
-                        'SensorType': row[9],
-                        'Active': bool(row[10])
+                        'SensorType': row[3],
+                        'Active': bool(row[4])
                     },
-                    'Data': [data_object],
-                    'Corners': [corner_object]
+                    'Subdivisions': [sub_division],  # Array of sub_division objects
                 }
 
         # Convert dictionary values to list of measurements
         data = list(measurement_data.values())
 
         if len(rows) == 0 or len(data) == 0:  # Return 500 and empty list if no data is found
-            print(f"An error occurred while querying the database")
+            print(f"Error in querying database")
             resp_code = 500
             marker_data = '[]'
         else:
@@ -90,7 +76,7 @@ def get_all_markers(self, cursor, valid: bool):
             marker_data = json.dumps(data, indent=4)
 
     except Exception as e:
-        print(f"An error occurred while querying the database: {e}")
+        print(f"Error in querying database: {e}")
         resp_code = 500
         marker_data = '[]'
 
@@ -101,4 +87,3 @@ def get_all_markers(self, cursor, valid: bool):
 
     # Write marker data to response object
     self.wfile.write(marker_data.encode('utf-8'))
-
diff --git a/server/sql_db/icedb b/server/sql_db/icedb
index e01a5712975ae037329fb433f502db93106da42e..b19e3e7766c83a08ad8f1b6aa7c08743c90ab02d 100644
Binary files a/server/sql_db/icedb and b/server/sql_db/icedb differ
diff --git a/server/sql_db/schema.sql b/server/sql_db/schema.sql
index 3ac83acef029146dd4341548e86ee161273aeda3..1413821693b00eaf9221756ddf08375bfbc10f61 100644
--- a/server/sql_db/schema.sql
+++ b/server/sql_db/schema.sql
@@ -1,96 +1,66 @@
-CREATE TABLE Measurement (
-    MeasurementID INT PRIMARY KEY,
-    SensorID INT,
-    TimeMeasured DATETIME,
-    WaterBodyName TEXT,
-    FOREIGN KEY (SensorID) REFERENCES Sensor(SensorID),
-    FOREIGN KEY (WaterBodyName) REFERENCES BodyOfWater(Name)
+-- Body of water
+CREATE TABLE BodyOfWater (
+    Name TEXT PRIMARY KEY
 );
 
+-- Single sensor
 CREATE TABLE Sensor (
-    SensorID INTEGER PRIMARY KEY,
+    SensorID INT PRIMARY KEY,
     SensorType TEXT CHECK(SensorType IN ('LiDar', 'Magnetic', 'Other')),
     Active BOOLEAN
 );
 
-CREATE TABLE Data (
-    MeasurementID INT,
-    Latitude FLOAT,
-    Longitude FLOAT,
-    IceTop FLOAT,
-    IceBottom FLOAT,
-    CalculatedThickness FLOAT,
-    Accuracy FLOAT,
-    PRIMARY KEY (MeasurementID, Longitude, Latitude),
-    FOREIGN KEY (MeasurementID) REFERENCES Measurement(MeasurementID)
+-- Measurement taken at a given time
+CREATE TABLE Measurement (
+    MeasurementID INT PRIMARY KEY,
+    SensorID INT NOT NULL,
+    TimeMeasured DATETIME NOT NULL,
+    WaterBodyName TEXT NOT NULL,
+    WholeAverageThickness FLOAT NOT NULL,
+    FOREIGN KEY (SensorID) REFERENCES Sensor(SensorID),
+    FOREIGN KEY (WaterBodyName) REFERENCES BodyOfWater(Name)
 );
 
-CREATE TABLE Corner (
-    CornerID INT,
+CREATE TABLE SubDivision (
     MeasurementID INT,
-    CornerLatitude FLOAT,
-    CornerLongitude FLOAT,
-    PRIMARY KEY (CornerID, MeasurementID),
-    FOREIGN KEY (MeasurementID) REFERENCES Measurement(MeasurementID)
+    SubDivisionID INT,
+    GroupID INT NOT NULL,
+    MinimumThickness FLOAT NOT NULL,
+    AverageThickness FLOAT NOT NULL,
+    CenterLatitude FLOAT NOT NULL,
+    CenterLongitude FLOAT NOT NULL,
+    Accuracy FLOAT,
+    FOREIGN KEY (MeasurementID) REFERENCES Measurement(MeasurementID),
+    PRIMARY KEY (MeasurementID, SubDivisionID)
 );
 
-CREATE TABLE BodyOfWater (
-    Name TEXT PRIMARY KEY
-);
+-- Indexes
+CREATE INDEX idx_measurement_waterbodyname ON Measurement(WaterBodyName);
+CREATE INDEX idx_measurement_timemeasured ON Measurement(TimeMeasured);
 
+-- Test data
 INSERT INTO Sensor (SensorID, SensorType, Active) VALUES
 (1, 'LiDar', 1),
 (2, 'Magnetic', 1),
 (3, 'Other', 0);
 
-INSERT INTO Measurement (MeasurementID, SensorID, TimeMeasured, WaterBodyName) VALUES
-(1, 2, '2024-01-01 10:00:00', 'Mjosa'),
-(2, 2, '2024-02-04 11:00:00', 'Mjosa'),
-(3, 1, '2024-02-13 12:00:00', 'Mjosa');
-
--- Measurement 1
-INSERT INTO Data (MeasurementID, Latitude, Longitude, IceTop, IceBottom, CalculatedThickness, Accuracy) VALUES
-(1, 60.7070, 10.9771, 8.0, 3.0, 5.0, 1.0),
-(1, 60.7066, 10.9772, 7.5, 2.5, 5.0, 1.0),
-(1, 60.7067, 10.9773, 7.5, 2.5, 5.0, 1.0),
-(1, 60.7062, 10.9774, 7.5, 2.5, 5.0, 1.0),
-(1, 60.7067, 10.9775, 7.0, 2.0, 5.0, 1.0);
-
-INSERT INTO Corner (CornerID, MeasurementID, CornerLatitude, CornerLongitude) VALUES
-(1, 1, 60.7060, 10.9770),
-(2, 1, 60.7061, 10.9771),
-(3, 1, 60.7062, 10.9772),
-(4, 1, 60.7063, 10.9773);
-
--- Measurement 2
-INSERT INTO Data (MeasurementID, Latitude, Longitude, IceTop, IceBottom, CalculatedThickness, Accuracy) VALUES
-(2, 60.6366, 10.8171, 7.2, 2.2, 5.0, 1.5),
-(2, 60.6367, 10.8172, 7.0, 2.0, 5.0, 1.5),
-(2, 60.6368, 10.8172, 7.1, 2.1, 5.0, 1.5),
-(2, 60.6369, 10.8172, 7.3, 2.3, 5.0, 1.5),
-(2, 60.6367, 10.8173, 7.4, 2.4, 5.0, 1.5),
-(2, 60.6367, 10.8179, 7.5, 2.5, 5.0, 1.5);
+INSERT INTO BodyOfWater(Name) VALUES
+('Mjosa');
 
-INSERT INTO Corner (CornerID, MeasurementID, CornerLatitude, CornerLongitude) VALUES
-(1, 2, 60.6360, 10.8170),
-(2, 2, 60.6361, 10.8171),
-(3, 2, 60.6362, 10.8172),
-(4, 2, 60.6363, 10.8173);
+INSERT INTO Measurement (MeasurementID, SensorID, TimeMeasured, WaterBodyName, WholeAverageThickness) VALUES
+(1, 2, '2024-01-01 10:00:00', 'Mjosa', 5.8),
+(2, 2, '2024-02-04 11:00:00', 'Mjosa', 7.6),
+(3, 1, '2024-02-13 12:00:00', 'Mjosa', 4.1);
 
--- Measurement 3
-INSERT INTO Data (MeasurementID, Latitude, Longitude, IceTop, IceBottom, CalculatedThickness, Accuracy) VALUES
-(3, 60.7366, 10.8471, 7.5, 2.5, 5.0, 2.5),
-(3, 60.7369, 10.8471, 7.4, 2.4, 5.0, 2.5),
-(3, 60.7367, 10.8480, 7.3, 2.3, 5.0, 2.5),
-(3, 60.7368, 10.8481, 7.2, 2.2, 5.0, 2.5),
-(3, 60.7370, 10.8475, 7.1, 2.1, 5.0, 2.5);
+INSERT INTO SubDivision (MeasurementID, SubDivisionID, GroupID, MinimumThickness, AverageThickness, CenterLatitude, CenterLongitude, Accuracy)  VALUES
+(1, 1, 1, 3.2, 4.5, 60.765, 10.723, 1.2),
+(1, 2, 1, 2.8, 4.3, 60.780, 10.776, 1.1),
+(1, 3, 2, 4.1, 5.7, 60.768, 10.845, 1.3),
+(1, 4, 2, 3.5, 5.0, 60.749, 10.783, 1.4),
+(2, 1, 1, 4.1, 5.7, 60.768, 10.845, 1.3),
+(2, 2, 2, 3.5, 5.0, 60.749, 10.783, 1.4),
+(3, 1, 1, 4.1, 5.7, 60.768, 10.845, 1.3),
+(3, 2, 2, 3.5, 5.0, 60.749, 10.783, 1.4);
 
-INSERT INTO Corner (CornerID, MeasurementID, CornerLatitude, CornerLongitude) VALUES
-(1, 3, 60.7360, 10.8470),
-(2, 3, 60.7361, 10.8471),
-(3, 3, 60.7362, 10.8472),
-(4, 3, 60.7363, 10.8473);
 
-INSERT INTO BodyOfWater(Name) VALUES
-('Mjosa');