diff --git a/.gradle/5.1.1/executionHistory/executionHistory.bin b/.gradle/5.1.1/executionHistory/executionHistory.bin
index ee1196166be61b38ab3c41ba8a6c0fec57d689ce..d261197256c1845414cc284c3c3c843a43de12b7 100644
Binary files a/.gradle/5.1.1/executionHistory/executionHistory.bin and b/.gradle/5.1.1/executionHistory/executionHistory.bin differ
diff --git a/.gradle/5.1.1/executionHistory/executionHistory.lock b/.gradle/5.1.1/executionHistory/executionHistory.lock
index f1c6e6c4f5d014c1a9dc0bd1cad085d6bde0d30f..23fce472c845b30e228007523072de2c569669a4 100644
Binary files a/.gradle/5.1.1/executionHistory/executionHistory.lock and b/.gradle/5.1.1/executionHistory/executionHistory.lock differ
diff --git a/.gradle/5.1.1/fileHashes/fileHashes.bin b/.gradle/5.1.1/fileHashes/fileHashes.bin
index adf4cf756c92ce7d4aeaf857a8fe39859ad0c1d7..eda4f8719148e1eee0ce081d2574dbb15e06db17 100644
Binary files a/.gradle/5.1.1/fileHashes/fileHashes.bin and b/.gradle/5.1.1/fileHashes/fileHashes.bin differ
diff --git a/.gradle/5.1.1/fileHashes/fileHashes.lock b/.gradle/5.1.1/fileHashes/fileHashes.lock
index f2c11ed8a3fdcffad8b19c4cb31820680d5aca25..e45edc0e94e3ab04fa3ff7da7a2509176d3539e3 100644
Binary files a/.gradle/5.1.1/fileHashes/fileHashes.lock and b/.gradle/5.1.1/fileHashes/fileHashes.lock differ
diff --git a/.gradle/5.1.1/javaCompile/classAnalysis.bin b/.gradle/5.1.1/javaCompile/classAnalysis.bin
index a26be942b95c60fc4fa3482c925d5980a86c5088..3565f33998773d43e22fd46a3bdbb35ab3656a98 100644
Binary files a/.gradle/5.1.1/javaCompile/classAnalysis.bin and b/.gradle/5.1.1/javaCompile/classAnalysis.bin differ
diff --git a/.gradle/5.1.1/javaCompile/javaCompile.lock b/.gradle/5.1.1/javaCompile/javaCompile.lock
index 14d728d7d9f35bf1ed30e102dacdc8319594ce6d..f9a6e55cc0e77ce66c41405089bf6ab27edcf884 100644
Binary files a/.gradle/5.1.1/javaCompile/javaCompile.lock and b/.gradle/5.1.1/javaCompile/javaCompile.lock differ
diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock
index 24d9f24b0ebf71b0a55b141d0a47c1207280f5a8..1cf890c4382b69e61483fc1dbffe4492dee41872 100644
Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ
diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser
index 256b9fc9151b2ea3ed0f80bd6d139919ccb0bf03..bcd48529c4111d84f9fd1883fd75a2c317dfa287 100644
Binary files a/.idea/caches/build_file_checksums.ser and b/.idea/caches/build_file_checksums.ser differ
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 0d45e8dac234fb8d8ce72a22fa160d3a6ababc22..f5c6d9eb6a991d73b50e99d55a1a22a208ef247d 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
-  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
 </project>
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 842e3b36685a9c662f3ba6d6a40609cc6ace04f7..eca632cfc5cbd913739ee3b8d42bdc3cb6ac1cb7 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,62 +6,31 @@
     </shared>
   </component>
   <component name="AndroidLogFilters">
+    <option name="TOOL_WINDOW_LOG_LEVEL" value="verbose" />
     <option name="TOOL_WINDOW_CONFIGURED_FILTER" value="Show only selected application" />
   </component>
   <component name="ChangeListManager">
     <list default="true" id="92eeab65-885e-4873-8c3f-1e2cdc70020e" name="Default Changelist" comment="map activity code updated - Mark Wu">
-      <change afterPath="$PROJECT_DIR$/.idea/libraries/Gradle__com_google_auto_value_auto_value_annotations_1_6_3_jar.xml" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/.idea/libraries/Gradle__com_google_firebase_firebase_auth_17_0_0_aar.xml" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/.idea/libraries/Gradle__com_google_firebase_firebase_auth_interop_17_0_0_aar.xml" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/.idea/libraries/Gradle__com_google_firebase_firebase_common_17_0_0_aar.xml" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/.idea/libraries/Gradle__com_google_firebase_firebase_functions_17_0_0_aar.xml" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/.idea/libraries/Gradle__com_google_firebase_firebase_storage_17_0_0_aar.xml" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/.idea/libraries/Gradle__com_squareup_okhttp3_okhttp_3_12_1_jar.xml" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/.idea/libraries/Gradle__com_squareup_okio_okio_1_15_0_jar.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Driver_Profile_Passenger_View.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/main/res/layout/activity_driver__profile__passenger__view.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.gradle/5.1.1/executionHistory/executionHistory.bin" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/5.1.1/executionHistory/executionHistory.bin" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.gradle/5.1.1/executionHistory/executionHistory.lock" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/5.1.1/executionHistory/executionHistory.lock" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.gradle/5.1.1/fileHashes/fileHashes.bin" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/5.1.1/fileHashes/fileHashes.bin" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.gradle/5.1.1/fileHashes/fileHashes.lock" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/5.1.1/fileHashes/fileHashes.lock" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.gradle/5.1.1/javaCompile/classAnalysis.bin" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/5.1.1/javaCompile/classAnalysis.bin" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.gradle/5.1.1/javaCompile/javaCompile.lock" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/5.1.1/javaCompile/javaCompile.lock" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/.gradle/5.1.1/javaCompile/taskHistory.bin" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/5.1.1/javaCompile/taskHistory.bin" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.gradle/buildOutputCleanup/buildOutputCleanup.lock" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/buildOutputCleanup/buildOutputCleanup.lock" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/.gradle/buildOutputCleanup/outputFiles.bin" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/buildOutputCleanup/outputFiles.bin" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/caches/build_file_checksums.ser" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/caches/build_file_checksums.ser" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/.idea/libraries/Gradle__com_google_android_gms_play_services_measurement_16_4_0_aar.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/libraries/Gradle__com_google_android_gms_play_services_measurement_16_5_0_aar.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/.idea/libraries/Gradle__com_google_android_gms_play_services_measurement_api_16_4_0_aar.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/libraries/Gradle__com_google_android_gms_play_services_measurement_api_16_5_0_aar.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/.idea/libraries/Gradle__com_google_android_gms_play_services_measurement_base_16_4_0_aar.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/libraries/Gradle__com_google_android_gms_play_services_measurement_base_16_5_0_aar.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/.idea/libraries/Gradle__com_google_android_gms_play_services_measurement_impl_16_4_0_aar.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/libraries/Gradle__com_google_android_gms_play_services_measurement_impl_16_5_0_aar.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/.idea/libraries/Gradle__com_google_android_gms_play_services_measurement_sdk_16_4_0_aar.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/libraries/Gradle__com_google_android_gms_play_services_measurement_sdk_16_5_0_aar.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/.idea/libraries/Gradle__com_google_android_gms_play_services_measurement_sdk_api_16_4_0_aar.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/libraries/Gradle__com_google_android_gms_play_services_measurement_sdk_api_16_5_0_aar.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/.idea/libraries/Gradle__com_google_auto_value_auto_value_annotations_1_6_jar.xml" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/.idea/libraries/Gradle__com_google_firebase_firebase_analytics_16_4_0_aar.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/libraries/Gradle__com_google_firebase_firebase_analytics_16_5_0_aar.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/.idea/libraries/Gradle__com_google_firebase_firebase_auth_16_2_1_aar.xml" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/.idea/libraries/Gradle__com_google_firebase_firebase_auth_interop_16_0_1_aar.xml" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/.idea/libraries/Gradle__com_google_firebase_firebase_common_16_1_0_aar.xml" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/.idea/libraries/Gradle__com_google_firebase_firebase_core_16_0_8_aar.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/libraries/Gradle__com_google_firebase_firebase_core_16_0_9_aar.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/.idea/libraries/Gradle__com_google_firebase_firebase_database_16_1_0_aar.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/libraries/Gradle__com_google_firebase_firebase_database_17_0_0_aar.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/.idea/libraries/Gradle__com_google_firebase_firebase_iid_17_0_3_aar.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/libraries/Gradle__com_google_firebase_firebase_iid_18_0_0_aar.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/.idea/libraries/Gradle__com_google_firebase_firebase_storage_16_0_2_aar.xml" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/build.gradle" beforeDir="false" afterPath="$PROJECT_DIR$/build.gradle" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/local.properties" beforeDir="false" afterPath="$PROJECT_DIR$/local.properties" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/src/main/AndroidManifest.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/AndroidManifest.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Driver_Profile.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Driver_Profile.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Driver_Register.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Driver_Register.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Homepage.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Homepage.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Driver_Main.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Driver_Main.java" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Login.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Login.java" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Map.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Map.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Offline_Map.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Offline_Map.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Rating.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Rating.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Register.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Register.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Route.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Route.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/SavedRoutes.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/SavedRoutes.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Settings.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Settings.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/User_Register.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/User_Register.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/main/res/layout/activity_rating.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/res/layout/activity_rating.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/main/res/values/strings.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/res/values/strings.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/unirides.iml" beforeDir="false" afterPath="$PROJECT_DIR$/unirides.iml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/User_Main.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/User_Main.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/ViewRoutes.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/ViewRoutes.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/res/layout/activity_view_routes.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/res/layout/activity_view_routes.xml" afterDir="false" />
     </list>
     <ignored path="$PROJECT_DIR$/build/generated/not_namespaced_r_class_sources/" />
     <ignored path="$PROJECT_DIR$/build/generated/source/r/" />
@@ -128,117 +97,120 @@
   <component name="FileEditorManager">
     <leaf>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Settings.java">
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Map.java">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="677">
-              <caret line="172" selection-start-line="172" selection-end-line="172" />
+            <state relative-caret-position="-1343">
+              <caret line="98" selection-start-line="98" selection-end-line="98" />
+              <folding>
+                <element signature="imports" expanded="true" />
+              </folding>
             </state>
           </provider>
         </entry>
       </file>
-      <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/User_Register.java">
+      <file pinned="false" current-in-tab="true">
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/ViewRoutes.java">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="343">
-              <caret line="146" column="36" selection-start-line="146" selection-start-column="36" selection-end-line="146" selection-end-column="36" />
+            <state relative-caret-position="238">
+              <caret line="96" column="87" lean-forward="true" selection-start-line="96" selection-start-column="87" selection-end-line="96" selection-end-column="87" />
+              <folding>
+                <element signature="e#5065#5078#0" expanded="true" />
+                <element signature="e#5080#5094#0" expanded="true" />
+                <element signature="e#5343#8452#0" expanded="true" />
+                <element signature="e#8451#8452#0" expanded="true" />
+              </folding>
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/ViewRoutes.java">
+        <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_report_problem.xml">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="2227">
-              <caret line="147" column="28" selection-start-line="147" selection-start-column="28" selection-end-line="147" selection-end-column="28" />
-              <folding>
-                <element signature="e#1758#1771#0" expanded="true" />
-                <element signature="e#1773#1787#0" expanded="true" />
-              </folding>
+            <state relative-caret-position="301">
+              <caret line="26" column="24" selection-start-line="26" selection-start-column="24" selection-end-line="26" selection-end-column="24" />
             </state>
           </provider>
+          <provider editor-type-id="android-designer2" />
         </entry>
       </file>
-      <file pinned="false" current-in-tab="true">
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Rating.java">
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/main/AndroidManifest.xml">
+          <provider editor-type-id="android-manifest" />
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="626">
-              <caret line="127" column="41" selection-start-line="127" selection-start-column="41" selection-end-line="127" selection-end-column="41" />
+            <state relative-caret-position="720">
+              <caret line="61" selection-start-line="61" selection-end-line="61" />
               <folding>
-                <element signature="imports" expanded="true" />
-                <element signature="e#4122#4817#0" expanded="true" />
-                <element signature="e#4816#4817#0" expanded="true" />
-                <element signature="e#4918#4931#0" expanded="true" />
-                <element signature="e#4932#4946#0" expanded="true" />
-                <element signature="e#5185#8178#0" expanded="true" />
-                <element signature="e#8177#8178#0" expanded="true" />
-                <element signature="e#6921#6922#0" expanded="true" />
-                <element signature="e#6953#6954#0" expanded="true" />
-                <element signature="e#6997#6998#0" expanded="true" />
-                <element signature="e#7030#7031#0" expanded="true" />
-                <element signature="e#9636#11058#0" expanded="true" />
-                <element signature="e#11057#11058#0" expanded="true" />
-                <element signature="e#11498#12065#0" expanded="true" />
-                <element signature="e#12064#12065#0" expanded="true" />
+                <element signature="e#5175#5192#0" expanded="true" />
+                <element signature="e#5298#5319#0" expanded="true" />
               </folding>
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_rating.xml">
-          <provider editor-type-id="text-editor">
-            <state relative-caret-position="1309">
-              <caret line="85" column="51" selection-start-line="85" selection-start-column="51" selection-end-line="85" selection-end-column="51" />
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/SavedRoutes.java">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="2173">
+              <caret line="282" selection-start-line="282" selection-end-line="282" />
             </state>
           </provider>
-          <provider selected="true" editor-type-id="android-designer2" />
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Driver_Main.java">
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Route.java">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="-34">
-              <caret line="36" column="9" selection-start-line="36" selection-start-column="9" selection-end-line="36" selection-end-column="9" />
+            <state relative-caret-position="677">
+              <caret line="210" column="36" selection-start-line="168" selection-start-column="15" selection-end-line="210" selection-end-column="36" />
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Driver_Profile.java">
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Driver_Profile_Passenger_View.java">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="476">
-              <caret line="188" column="33" selection-start-line="188" selection-start-column="33" selection-end-line="188" selection-end-column="33" />
+            <state relative-caret-position="408">
+              <caret line="110" column="9" selection-start-line="110" selection-start-column="9" selection-end-line="110" selection-end-column="9" />
+              <folding>
+                <element signature="e#5582#5940#0" expanded="true" />
+                <element signature="e#5939#5940#0" expanded="true" />
+                <element signature="e#6044#6057#0" expanded="true" />
+                <element signature="e#6059#6073#0" expanded="true" />
+                <element signature="e#9087#9088#0" expanded="true" />
+                <element signature="e#9119#9120#0" expanded="true" />
+                <element signature="e#9163#9164#0" expanded="true" />
+                <element signature="e#9196#9197#0" expanded="true" />
+              </folding>
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Map.java">
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Driver_Main.java">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="476">
-              <caret line="212" column="29" selection-start-line="212" selection-start-column="29" selection-end-line="212" selection-end-column="29" />
-              <folding>
-                <element signature="imports" expanded="true" />
-              </folding>
+            <state relative-caret-position="357">
+              <caret line="37" selection-start-line="37" selection-end-line="37" />
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/main/AndroidManifest.xml">
-          <provider editor-type-id="android-manifest" />
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/User_Main.java">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="-572">
-              <caret line="45" column="18" selection-start-line="45" selection-start-column="18" selection-end-line="45" selection-end-column="18" />
+            <state relative-caret-position="187">
+              <caret line="31" column="13" selection-start-line="31" selection-start-column="13" selection-end-line="31" selection-end-column="13" />
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/build.gradle">
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Driver_Profile.java">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="132">
-              <caret line="29" column="94" selection-start-line="29" selection-start-column="94" selection-end-line="29" selection-end-column="94" />
+            <state relative-caret-position="255">
+              <caret line="104" column="59" selection-start-line="104" selection-start-column="59" selection-end-line="104" selection-end-column="59" />
+              <folding>
+                <element signature="e#7243#7470#0" expanded="true" />
+                <element signature="e#7469#7470#0" expanded="true" />
+              </folding>
             </state>
           </provider>
         </entry>
@@ -273,6 +245,7 @@
   <component name="Git.Settings">
     <option name="PREVIOUS_COMMIT_AUTHORS">
       <list>
+        <option value="James Wright &lt;jw01324@surrey.ac.uk&gt; &amp; Ronan" />
         <option value="James Wright &lt;jw01324@surrey.ac.uk&gt;" />
       </list>
     </option>
@@ -295,11 +268,8 @@
         <option value="$PROJECT_DIR$/src/main/res/layout/activity_user_profile.xml" />
         <option value="$PROJECT_DIR$/src/main/res/menu/toolbar_menu.xml" />
         <option value="$PROJECT_DIR$/src/main/res/menu/navbar_menu.xml" />
-        <option value="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/User_Main.java" />
-        <option value="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Driver_Main.java" />
         <option value="$PROJECT_DIR$/src/main/res/layout/activity_driver_register.xml" />
         <option value="$PROJECT_DIR$/src/main/res/layout/activity_user_register.xml" />
-        <option value="$PROJECT_DIR$/src/main/AndroidManifest.xml" />
         <option value="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Terms.java" />
         <option value="$PROJECT_DIR$/src/main/res/layout/activity_report_problem.xml" />
         <option value="$PROJECT_DIR$/src/main/res/layout/activity_terms.xml" />
@@ -313,19 +283,25 @@
         <option value="$PROJECT_DIR$/src/main/res/layout/activity_login.xml" />
         <option value="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Driver_Register.java" />
         <option value="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Homepage.java" />
-        <option value="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Login.java" />
         <option value="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Offline_Map.java" />
         <option value="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Register.java" />
         <option value="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Route.java" />
         <option value="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/SavedRoutes.java" />
         <option value="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/User_Register.java" />
         <option value="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Settings.java" />
-        <option value="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/ViewRoutes.java" />
         <option value="$PROJECT_DIR$/build.gradle" />
-        <option value="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Map.java" />
         <option value="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Driver_Profile.java" />
         <option value="$PROJECT_DIR$/src/main/res/layout/activity_rating.xml" />
         <option value="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Rating.java" />
+        <option value="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Login.java" />
+        <option value="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Map.java" />
+        <option value="$PROJECT_DIR$/src/main/res/layout/activity_view_routes.xml" />
+        <option value="$PROJECT_DIR$/src/main/res/layout/activity_driver__profile__passenger__view.xml" />
+        <option value="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Driver_Main.java" />
+        <option value="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/User_Main.java" />
+        <option value="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Driver_Profile_Passenger_View.java" />
+        <option value="$PROJECT_DIR$/src/main/AndroidManifest.xml" />
+        <option value="$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/ViewRoutes.java" />
       </list>
     </option>
   </component>
@@ -377,12 +353,6 @@
               <item name="res" type="d4f16f75:AndroidResFolderNode" />
               <item name="layout" type="ddeffd01:AndroidResFolderTypeNode" />
             </path>
-            <path>
-              <item name="unirides" type="1abcf292:AndroidViewProjectNode" />
-              <item name="unirides" type="feadf853:AndroidModuleNode" />
-              <item name="res" type="d4f16f75:AndroidResFolderNode" />
-              <item name="menu" type="ddeffd01:AndroidResFolderTypeNode" />
-            </path>
             <path>
               <item name="unirides" type="1abcf292:AndroidViewProjectNode" />
               <item name="Gradle Scripts" type="ae0cef3a:AndroidBuildScriptsGroupNode" />
@@ -574,7 +544,14 @@
       <option name="project" value="LOCAL" />
       <updated>1557706013730</updated>
     </task>
-    <option name="localTasksCounter" value="4" />
+    <task id="LOCAL-00004" summary="Added Ronan's code for server computations in rating + bug fixes">
+      <created>1557740957584</created>
+      <option name="number" value="00004" />
+      <option name="presentableId" value="LOCAL-00004" />
+      <option name="project" value="LOCAL" />
+      <updated>1557740957584</updated>
+    </task>
+    <option name="localTasksCounter" value="5" />
     <servers />
   </component>
   <component name="TodoView">
@@ -603,12 +580,12 @@
       <window_info anchor="bottom" id="TODO" order="1" sideWeight="0.49924013" weight="0.329582" />
       <window_info anchor="bottom" id="Android Profiler" order="2" weight="0.329582" />
       <window_info anchor="bottom" id="Debug" order="3" />
-      <window_info anchor="bottom" id="Terminal" order="4" sideWeight="0.49940357" weight="0.32969603" />
-      <window_info anchor="bottom" id="Event Log" order="5" sideWeight="0.5025845" side_tool="true" visible="true" weight="0.3289166" />
+      <window_info anchor="bottom" id="Terminal" order="4" sideWeight="0.49900597" weight="0.32969603" />
+      <window_info anchor="bottom" id="Event Log" order="5" sideWeight="0.10139165" side_tool="true" visible="true" weight="0.3289166" />
       <window_info anchor="bottom" id="Find" order="6" sideWeight="0.49940357" weight="0.3289166" />
       <window_info anchor="bottom" id="Version Control" order="7" sideWeight="0.49940357" weight="0.32969603" />
-      <window_info anchor="bottom" id="Build" order="8" sideWeight="0.4974155" visible="true" weight="0.3289166" />
-      <window_info anchor="bottom" id="Logcat" order="9" sideWeight="0.89900595" weight="0.3289166" />
+      <window_info anchor="bottom" id="Build" order="8" sideWeight="0.4970179" weight="0.3289166" />
+      <window_info anchor="bottom" id="Logcat" order="9" sideWeight="0.8986083" visible="true" weight="0.3289166" />
       <window_info anchor="right" id="Device File Explorer" order="0" side_tool="true" />
       <window_info anchor="right" id="Capture Analysis" order="1" />
       <window_info anchor="right" id="Gradle" order="2" />
@@ -648,33 +625,10 @@
     <MESSAGE value="Merge between small_profile_changes &amp; route_update with fixed navbar and overall navigation." />
     <MESSAGE value="Updated Mark's code to fix it!" />
     <MESSAGE value="re-push, missed some code" />
-    <option name="LAST_COMMIT_MESSAGE" value="re-push, missed some code" />
+    <MESSAGE value="Added Ronan's code for server computations in rating + bug fixes" />
+    <option name="LAST_COMMIT_MESSAGE" value="Added Ronan's code for server computations in rating + bug fixes" />
   </component>
   <component name="editorHistoryManager">
-    <entry file="file://$PROJECT_DIR$/src/main/res/layout/user_toolbar.xml">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="165">
-          <caret line="11" column="9" selection-start-line="11" selection-start-column="9" selection-end-line="11" selection-end-column="9" />
-        </state>
-      </provider>
-      <provider editor-type-id="android-designer2" />
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/res/menu/navbar_menu.xml">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="90">
-          <caret line="6" column="27" selection-start-line="6" selection-start-column="27" selection-end-line="6" selection-end-column="27" />
-        </state>
-      </provider>
-      <provider editor-type-id="android-designer2" />
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_user_register.xml">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="551">
-          <caret line="121" column="29" selection-start-line="121" selection-start-column="29" selection-end-line="121" selection-end-column="29" />
-        </state>
-      </provider>
-      <provider editor-type-id="android-designer2" />
-    </entry>
     <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/TimeFragment.java">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="90">
@@ -682,14 +636,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_map.xml">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="525">
-          <caret line="35" column="41" selection-start-line="35" selection-start-column="41" selection-end-line="35" selection-end-column="41" />
-        </state>
-      </provider>
-      <provider editor-type-id="android-designer2" />
-    </entry>
     <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_homepage.xml">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="697">
@@ -728,14 +674,6 @@
       </provider>
       <provider editor-type-id="android-designer2" />
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_report_problem.xml">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="573">
-          <caret line="111" column="26" selection-start-line="111" selection-start-column="26" selection-end-line="111" selection-end-column="26" />
-        </state>
-      </provider>
-      <provider editor-type-id="android-designer2" />
-    </entry>
     <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_terms.xml">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="270">
@@ -780,14 +718,6 @@
       </provider>
       <provider editor-type-id="android-designer2" />
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_driver_profile.xml">
-      <provider editor-type-id="text-editor">
-        <state relative-caret-position="701">
-          <caret line="190" column="51" selection-start-line="190" selection-start-column="51" selection-end-line="190" selection-end-column="51" />
-        </state>
-      </provider>
-      <provider selected="true" editor-type-id="android-designer2" />
-    </entry>
     <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_driver_main.xml">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="1683">
@@ -853,13 +783,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/User_Main.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="340">
-          <caret line="42" column="37" selection-start-line="42" selection-start-column="37" selection-end-line="42" selection-end-column="37" />
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_route.xml">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="1910">
@@ -906,10 +829,6 @@
       </provider>
       <provider selected="true" editor-type-id="android-designer2" />
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_view_routes.xml">
-      <provider editor-type-id="text-editor" />
-      <provider selected="true" editor-type-id="android-designer2" />
-    </entry>
     <entry file="file://$PROJECT_DIR$/src/main/res/menu/offline_toolbar_menu.xml">
       <provider selected="true" editor-type-id="text-editor" />
       <provider editor-type-id="android-designer2" />
@@ -936,16 +855,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Login.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="343">
-          <caret line="512" column="36" selection-start-line="512" selection-start-column="36" selection-end-line="512" selection-end-column="36" />
-          <folding>
-            <element signature="imports" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Offline_Map.java">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="326">
@@ -960,112 +869,207 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/SavedRoutes.java">
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/User_Register.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="135">
-          <caret line="282" selection-start-line="282" selection-end-line="282" />
+        <state relative-caret-position="343">
+          <caret line="146" column="36" selection-start-line="146" selection-start-column="36" selection-end-line="146" selection-end-column="36" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Route.java">
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Settings.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="286">
-          <caret line="565" column="61" selection-start-line="565" selection-start-column="61" selection-end-line="565" selection-end-column="61" />
+        <state relative-caret-position="677">
+          <caret line="172" selection-start-line="172" selection-end-line="172" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/User_Register.java">
+    <entry file="file://$PROJECT_DIR$/build.gradle">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="343">
-          <caret line="146" column="36" selection-start-line="146" selection-start-column="36" selection-end-line="146" selection-end-column="36" />
+        <state relative-caret-position="132">
+          <caret line="29" column="94" selection-start-line="29" selection-start-column="94" selection-end-line="29" selection-end-column="94" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Settings.java">
+    <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_rating.xml">
+      <provider editor-type-id="text-editor">
+        <state relative-caret-position="1309">
+          <caret line="85" column="51" selection-start-line="85" selection-start-column="51" selection-end-line="85" selection-end-column="51" />
+        </state>
+      </provider>
+      <provider selected="true" editor-type-id="android-designer2" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Rating.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="677">
-          <caret line="172" selection-start-line="172" selection-end-line="172" />
+        <state relative-caret-position="643">
+          <caret line="128" column="13" selection-start-line="128" selection-start-column="13" selection-end-line="128" selection-end-column="13" />
+          <folding>
+            <element signature="imports" expanded="true" />
+            <element signature="e#4122#4817#0" expanded="true" />
+            <element signature="e#4918#4931#0" expanded="true" />
+            <element signature="e#4932#4946#0" expanded="true" />
+            <element signature="e#5185#8178#0" expanded="true" />
+            <element signature="e#8177#8178#0" expanded="true" />
+            <element signature="e#6921#6922#0" expanded="true" />
+            <element signature="e#6953#6954#0" expanded="true" />
+            <element signature="e#6997#6998#0" expanded="true" />
+            <element signature="e#7030#7031#0" expanded="true" />
+            <element signature="e#9636#11058#0" expanded="true" />
+            <element signature="e#11057#11058#0" expanded="true" />
+            <element signature="e#11498#12065#0" expanded="true" />
+            <element signature="e#12064#12065#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/ViewRoutes.java">
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Login.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="2227">
-          <caret line="147" column="28" selection-start-line="147" selection-start-column="28" selection-end-line="147" selection-end-column="28" />
+        <state relative-caret-position="-680">
+          <caret line="288" column="51" selection-start-line="288" selection-start-column="51" selection-end-line="288" selection-end-column="51" />
           <folding>
-            <element signature="e#1758#1771#0" expanded="true" />
-            <element signature="e#1773#1787#0" expanded="true" />
+            <element signature="imports" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/AndroidManifest.xml">
-      <provider editor-type-id="android-manifest" />
+    <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_map.xml">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-572">
-          <caret line="45" column="18" selection-start-line="45" selection-start-column="18" selection-end-line="45" selection-end-column="18" />
+        <state>
+          <caret selection-end-line="35" selection-end-column="41" />
         </state>
       </provider>
+      <provider editor-type-id="android-designer2" />
     </entry>
-    <entry file="file://$PROJECT_DIR$/build.gradle">
+    <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_view_routes.xml">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="132">
-          <caret line="29" column="94" selection-start-line="29" selection-start-column="94" selection-end-line="29" selection-end-column="94" />
+        <state relative-caret-position="459">
+          <caret line="27" column="49" selection-start-line="27" selection-start-column="49" selection-end-line="27" selection-end-column="49" />
         </state>
       </provider>
+      <provider editor-type-id="android-designer2" />
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Map.java">
+    <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_driver_edit_profile.xml">
+      <provider editor-type-id="text-editor" />
+      <provider selected="true" editor-type-id="android-designer2" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_driver_profile.xml">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="476">
-          <caret line="212" column="29" selection-start-line="212" selection-start-column="29" selection-end-line="212" selection-end-column="29" />
+        <state relative-caret-position="650">
+          <caret line="187" column="38" selection-end-line="191" selection-end-column="41" />
+        </state>
+      </provider>
+      <provider editor-type-id="android-designer2" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_driver__profile__passenger__view.xml">
+      <provider editor-type-id="text-editor">
+        <state relative-caret-position="634">
+          <caret line="142" column="31" selection-start-line="142" selection-start-column="31" selection-end-line="142" selection-end-column="31" />
           <folding>
-            <element signature="imports" expanded="true" />
+            <element signature="e#987#1011#0" expanded="true" />
+            <element signature="e#1472#1489#0" expanded="true" />
+            <element signature="e#3005#3023#0" expanded="true" />
+            <element signature="e#3805#3827#0" expanded="true" />
+            <element signature="e#4727#4755#0" expanded="true" />
+            <element signature="e#5594#5614#0" expanded="true" />
           </folding>
         </state>
       </provider>
+      <provider selected="true" editor-type-id="android-designer2" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/User_Main.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="187">
+          <caret line="31" column="13" selection-start-line="31" selection-start-column="13" selection-end-line="31" selection-end-column="13" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Driver_Profile_Passenger_View.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="408">
+          <caret line="110" column="9" selection-start-line="110" selection-start-column="9" selection-end-line="110" selection-end-column="9" />
+          <folding>
+            <element signature="e#5582#5940#0" expanded="true" />
+            <element signature="e#5939#5940#0" expanded="true" />
+            <element signature="e#6044#6057#0" expanded="true" />
+            <element signature="e#6059#6073#0" expanded="true" />
+            <element signature="e#9087#9088#0" expanded="true" />
+            <element signature="e#9119#9120#0" expanded="true" />
+            <element signature="e#9163#9164#0" expanded="true" />
+            <element signature="e#9196#9197#0" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/SavedRoutes.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="2173">
+          <caret line="282" selection-start-line="282" selection-end-line="282" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Route.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="677">
+          <caret line="210" column="36" selection-start-line="168" selection-start-column="15" selection-end-line="210" selection-end-column="36" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_report_problem.xml">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="301">
+          <caret line="26" column="24" selection-start-line="26" selection-start-column="24" selection-end-line="26" selection-end-column="24" />
+        </state>
+      </provider>
+      <provider editor-type-id="android-designer2" />
     </entry>
     <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Driver_Main.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-34">
-          <caret line="36" column="9" selection-start-line="36" selection-start-column="9" selection-end-line="36" selection-end-column="9" />
+        <state relative-caret-position="357">
+          <caret line="37" selection-start-line="37" selection-end-line="37" />
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Driver_Profile.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="476">
-          <caret line="188" column="33" selection-start-line="188" selection-start-column="33" selection-end-line="188" selection-end-column="33" />
+        <state relative-caret-position="255">
+          <caret line="104" column="59" selection-start-line="104" selection-start-column="59" selection-end-line="104" selection-end-column="59" />
+          <folding>
+            <element signature="e#7243#7470#0" expanded="true" />
+            <element signature="e#7469#7470#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_rating.xml">
-      <provider editor-type-id="text-editor">
-        <state relative-caret-position="1309">
-          <caret line="85" column="51" selection-start-line="85" selection-start-column="51" selection-end-line="85" selection-end-column="51" />
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Map.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="-1343">
+          <caret line="98" selection-start-line="98" selection-end-line="98" />
+          <folding>
+            <element signature="imports" expanded="true" />
+          </folding>
         </state>
       </provider>
-      <provider selected="true" editor-type-id="android-designer2" />
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/Rating.java">
+    <entry file="file://$PROJECT_DIR$/src/main/AndroidManifest.xml">
+      <provider editor-type-id="android-manifest" />
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="626">
-          <caret line="127" column="41" selection-start-line="127" selection-start-column="41" selection-end-line="127" selection-end-column="41" />
+        <state relative-caret-position="720">
+          <caret line="61" selection-start-line="61" selection-end-line="61" />
           <folding>
-            <element signature="imports" expanded="true" />
-            <element signature="e#4122#4817#0" expanded="true" />
-            <element signature="e#4816#4817#0" expanded="true" />
-            <element signature="e#4918#4931#0" expanded="true" />
-            <element signature="e#4932#4946#0" expanded="true" />
-            <element signature="e#5185#8178#0" expanded="true" />
-            <element signature="e#8177#8178#0" expanded="true" />
-            <element signature="e#6921#6922#0" expanded="true" />
-            <element signature="e#6953#6954#0" expanded="true" />
-            <element signature="e#6997#6998#0" expanded="true" />
-            <element signature="e#7030#7031#0" expanded="true" />
-            <element signature="e#9636#11058#0" expanded="true" />
-            <element signature="e#11057#11058#0" expanded="true" />
-            <element signature="e#11498#12065#0" expanded="true" />
-            <element signature="e#12064#12065#0" expanded="true" />
+            <element signature="e#5175#5192#0" expanded="true" />
+            <element signature="e#5298#5319#0" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/liliyayankova/unirides/ViewRoutes.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="238">
+          <caret line="96" column="87" lean-forward="true" selection-start-line="96" selection-start-column="87" selection-end-line="96" selection-end-column="87" />
+          <folding>
+            <element signature="e#5065#5078#0" expanded="true" />
+            <element signature="e#5080#5094#0" expanded="true" />
+            <element signature="e#5343#8452#0" expanded="true" />
+            <element signature="e#8451#8452#0" expanded="true" />
           </folding>
         </state>
       </provider>
diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml
index 939a062ecc8cfeefdc5ddb111a660574e30b525e..6c9a3254fb049e6da0d111c56c95e82001494063 100644
--- a/src/main/AndroidManifest.xml
+++ b/src/main/AndroidManifest.xml
@@ -33,8 +33,6 @@
         android:roundIcon="@mipmap/ic_launcher_round"
         android:supportsRtl="true"
         android:theme="@style/AppTheme">
-        <activity android:name=".ViewRoutes"></activity>
-        <activity android:name=".ReportProblem" />
         <!--
              The API key for Google Maps-based APIs is defined as a string resource.
              (See the file "res/values/google_maps_api.xml").
@@ -55,11 +53,13 @@
             android:name=".Homepage"
             android:label="@string/app_name"
             android:screenOrientation="portrait">
+
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
 
                 <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
+
         </activity>
         <activity
             android:name=".Offline_Map"
@@ -115,6 +115,19 @@
         <activity
             android:name=".Terms"
             android:label="@string/settings" />
+        <activity
+            android:name=".Driver_Profile_Passenger_View"
+            android:label="@string/profile">
+
+        </activity>
+        <activity
+            android:name=".ViewRoutes"
+            android:label="@string/view_routes">
+
+        </activity>
+        <activity
+            android:name=".ReportProblem"
+            android:label="Report System" />
     </application>
 
 </manifest>
\ No newline at end of file
diff --git a/src/main/java/com/example/liliyayankova/unirides/Driver_Main.java b/src/main/java/com/example/liliyayankova/unirides/Driver_Main.java
index ab5aea70700d6c914c785632f5754c3c0c953494..9ccd67f9d61c5468d6b40127ea05ab91a953c885 100644
--- a/src/main/java/com/example/liliyayankova/unirides/Driver_Main.java
+++ b/src/main/java/com/example/liliyayankova/unirides/Driver_Main.java
@@ -36,6 +36,8 @@ public class Driver_Main extends AppCompatActivity  {
             Log.e("TOOLBAR", e.toString());
         }
 
+        Toast.makeText(Driver_Main.this, "To access the navbar, swipe from the left side of the screen.", Toast.LENGTH_LONG).show();
+
         dl = (DrawerLayout)findViewById(R.id.dl);
         dt = new ActionBarDrawerToggle(this,dl,R.string.Open,R.string.Close);
         dt.setDrawerIndicatorEnabled(true);
diff --git a/src/main/java/com/example/liliyayankova/unirides/Driver_Profile_Passenger_View.java b/src/main/java/com/example/liliyayankova/unirides/Driver_Profile_Passenger_View.java
new file mode 100644
index 0000000000000000000000000000000000000000..688df27c5f2fea46d38673ab0087cb558d5c1964
--- /dev/null
+++ b/src/main/java/com/example/liliyayankova/unirides/Driver_Profile_Passenger_View.java
@@ -0,0 +1,270 @@
+package com.example.liliyayankova.unirides;
+
+import android.Manifest;
+import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.net.Uri;
+import android.os.Build;
+import android.os.Environment;
+import android.os.StrictMode;
+import android.provider.MediaStore;
+import android.support.annotation.NonNull;
+import android.support.annotation.RequiresApi;
+import android.support.design.widget.NavigationView;
+import android.support.v4.widget.DrawerLayout;
+import android.support.v7.app.ActionBarDrawerToggle;
+import android.support.v7.app.AppCompatActivity;
+import android.os.Bundle;
+import android.support.v7.widget.Toolbar;
+import android.util.Log;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.Button;
+import android.widget.ImageView;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import com.google.android.gms.tasks.OnFailureListener;
+import com.google.android.gms.tasks.OnSuccessListener;
+import com.google.firebase.auth.FirebaseAuth;
+import com.google.firebase.auth.FirebaseUser;
+import com.google.firebase.database.DataSnapshot;
+import com.google.firebase.database.DatabaseError;
+import com.google.firebase.database.DatabaseReference;
+import com.google.firebase.database.FirebaseDatabase;
+import com.google.firebase.database.ValueEventListener;
+import com.google.firebase.storage.FirebaseStorage;
+import com.google.firebase.storage.StorageReference;
+import com.google.firebase.storage.UploadTask;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.InputStream;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import static java.lang.String.valueOf;
+
+public class Driver_Profile_Passenger_View extends AppCompatActivity {
+
+    private static final int CAMERA_REQUEST_CODE=1;
+
+    /**Constant fields for the permissions of the usage of camera */
+    private final int MY_PERMISSIONS_REQUEST_CAMERA = 1;
+
+    private TextView name;
+    private TextView lastName;
+    private TextView age;
+    private TextView driving;
+    private TextView license;
+    private TextView model;
+    private Button backButton;
+    private Button ratingButton;
+    private Button routeButton;
+
+    private DrawerLayout dl;
+    private ActionBarDrawerToggle dt;
+
+    private boolean isDriver;
+    private String driver_id;
+
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_driver__profile__passenger__view);
+        this.backButton = findViewById(R.id.backButton);
+        this.name = findViewById(R.id.textViewName);
+        this.lastName = findViewById(R.id.textViewLastName);
+        this.age = findViewById(R.id.textViewAge);
+        this.driving = findViewById(R.id.textViewDriving);
+        this.license = findViewById(R.id.textViewLicense);
+        this.model = findViewById(R.id.textViewModel);
+        this.ratingButton = findViewById(R.id.rateButton);
+
+
+        //assume the user is a passenger (isDriver = false) unless bundle extra userType value is DRIVER
+        isDriver = true;
+
+        /* checking if there are any bundle extras (should be the userType) */
+        if(getIntent().getExtras() != null) {
+            //setting userType to this result (DRIVER or PASSENGER)
+            if(getIntent().getExtras().get("userType") == Login.userType.DRIVER){
+                isDriver = true;
+            }
+
+            if (getIntent().getExtras().get("driver_id") != null){
+                driver_id = getIntent().getExtras().get("driver_id").toString();
+            }
+        }
+
+        //setting the user_toolbar layout as the action bar
+        Toolbar toolbar = findViewById(R.id.toolbar);
+        try {
+            setSupportActionBar(toolbar);
+        } catch (Exception e) {
+            Log.e("TOOLBAR", e.toString());
+        }
+
+        final DatabaseReference rootRef = FirebaseDatabase.getInstance().getReference();
+        DatabaseReference usernameRef;
+
+        usernameRef = rootRef.child("drivers").child(driver_id);
+        usernameRef.addListenerForSingleValueEvent(new ValueEventListener() {
+            @Override
+            public void onDataChange(DataSnapshot snapshot) {
+                if (snapshot.exists()) {
+                    // successfully found user in passengers / drivers in firebase
+                    name.setText(snapshot.child("first_name").getValue(String.class));
+                    lastName.setText(snapshot.child("last_name").getValue(String.class));
+                    age.setText(snapshot.child("age").getValue(String.class));
+                    driving.setText(snapshot.child("time_driving").getValue(String.class));
+                    license.setText(snapshot.child("license_plate").getValue(String.class));
+                    model.setText(snapshot.child("car_model").getValue(String.class));
+                }
+                else {
+                    // Haven't found the user, wrong about being driver/passenger? (or user id doesnt exist)
+                }
+
+            }
+
+            @Override
+            public void onCancelled(DatabaseError databaseError) {
+                Log.d("Firebase Error!", databaseError.getMessage()); //Don't ignore errors!
+            }
+        });
+
+
+        // For back button
+        backButton.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+
+                // maybe temporary
+                finish();
+            }
+        });
+
+
+        // For rating button
+        ratingButton.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                Intent i = new Intent(Driver_Profile_Passenger_View.this, Rating.class);
+                if(isDriver) {
+                    i.putExtra("userType", Login.userType.DRIVER);
+                }else{
+                    i.putExtra("userType", Login.userType.PASSENGER);
+                }
+                startActivity(i);
+            }
+        });
+
+        dl = (DrawerLayout) findViewById(R.id.dl);
+        dt = new ActionBarDrawerToggle(this, dl, R.string.Open, R.string.Close);
+        dt.setDrawerIndicatorEnabled(true);
+
+        dl.addDrawerListener(dt);
+        dt.syncState();
+
+        final NavigationView navbar = (NavigationView) findViewById(R.id.nav_view);
+        navbar.setNavigationItemSelectedListener(new NavigationView.OnNavigationItemSelectedListener() {
+            @Override
+            public boolean onNavigationItemSelected(@NonNull MenuItem menuItem) {
+                int id = menuItem.getItemId();
+
+                if (id == R.id.nav_home) {
+                    if(isDriver) {
+                        Intent home_i = new Intent(Driver_Profile_Passenger_View.this, Driver_Main.class);
+                        home_i.putExtra("userType", Login.userType.DRIVER);
+                        startActivity(home_i);
+                    }else{
+                        Intent home_i = new Intent(Driver_Profile_Passenger_View.this, User_Main.class);
+                        home_i.putExtra("userType", Login.userType.PASSENGER);
+                        startActivity(home_i);
+                    }
+                } else if (id == R.id.nav_account) {
+                    //do nothing as we're on profile page
+
+                } else if (id == R.id.nav_report) {
+                    if(isDriver) {
+                        Intent report_i = new Intent(Driver_Profile_Passenger_View.this, ReportProblem.class);
+                        report_i.putExtra("userType", Login.userType.DRIVER);
+                        startActivity(report_i);
+                    }else{
+                        Intent report_i = new Intent(Driver_Profile_Passenger_View.this, ReportProblem.class);
+                        report_i.putExtra("userType", Login.userType.PASSENGER);
+                        startActivity(report_i);
+                    }
+
+
+                } else if (id == R.id.nav_logout) {
+
+                        /*
+                        TODO:
+                            Possibly add a way to log out here? (not sure if we are even tracking the login instance
+                            within each activity? as far as I understand the login just gets you to the next activity
+                            however if you "logout" and just press the back button after it takes you back to the homepage
+                            it will act as if you are still logged in when you reenter).
+                            for now i have just set it so it goes back to the homepage (where you can register or login).
+                         */
+
+                    Toast.makeText(Driver_Profile_Passenger_View.this, "successfully logged out", Toast.LENGTH_SHORT).show();
+                    Intent logout_i = new Intent(Driver_Profile_Passenger_View.this, Homepage.class);
+                    startActivity(logout_i);
+
+                }
+                return true;
+            }
+        });
+    }
+
+
+
+    @Override
+    public void onResume(){
+        super.onResume();
+    }
+
+    @Override
+    public void onDestroy(){
+        super.onDestroy();
+    }
+
+
+    //Override for the user_toolbar menu items
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        MenuInflater menuInflater = getMenuInflater();
+        menuInflater.inflate(R.menu.toolbar_menu, menu);
+        return true;
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+
+        //checks the id of the item, if the item id matches a case id then the code in that case block will execute
+        switch(item.getItemId()){
+
+            case(R.id.item_settings):
+
+                Intent settings_i = new Intent(Driver_Profile_Passenger_View.this, Settings.class);
+
+                if(isDriver){
+                    settings_i.putExtra("userType", Login.userType.DRIVER);
+                }else{
+                    settings_i.putExtra("userType", Login.userType.PASSENGER);
+                }
+
+                startActivity(settings_i);
+
+                return true;
+        }
+
+        return super.onOptionsItemSelected(item);
+    }
+}
diff --git a/src/main/java/com/example/liliyayankova/unirides/Login.java b/src/main/java/com/example/liliyayankova/unirides/Login.java
index 1858cdef127d286e9a62c8bc0135c41c897693ae..8094a31d41c62eb1a873d60a6b6e186855431799 100644
--- a/src/main/java/com/example/liliyayankova/unirides/Login.java
+++ b/src/main/java/com/example/liliyayankova/unirides/Login.java
@@ -224,8 +224,6 @@ public class Login extends AppCompatActivity implements LoaderCallbacks<Cursor>
 
                 if(dataSnapshot.exists()){
 
-                    //TODO: remove this or change it - toast to confirm that the user is indeed a driver during testing
-                    Toast.makeText(Login.this, "Welcome back Driver!", Toast.LENGTH_SHORT).show();
                     startActivity(new Intent(Login.this, Driver_Main.class));
 
                 }else{
@@ -234,8 +232,7 @@ public class Login extends AppCompatActivity implements LoaderCallbacks<Cursor>
                      * no other option as the user has already logged in before this method is called, hence they must be a passenger
                      * if they are not a driver
                      */
-                    //TODO: remove this or change it - toast to confirm that the user is NOT a driver during testing
-                    Toast.makeText(Login.this, "Welcome back Passenger!", Toast.LENGTH_LONG).show();
+
                     startActivity(new Intent(Login.this, User_Main.class));
                 }
 
diff --git a/src/main/java/com/example/liliyayankova/unirides/Map.java b/src/main/java/com/example/liliyayankova/unirides/Map.java
index b89d932e78933bdc7dc722601b6932257b4e07a3..f1f3ac9e5885bd3e0c55e5e7e3222139cfd0a162 100644
--- a/src/main/java/com/example/liliyayankova/unirides/Map.java
+++ b/src/main/java/com/example/liliyayankova/unirides/Map.java
@@ -277,34 +277,6 @@ public class Map extends AppCompatActivity implements
         FirebaseUser user = mFirebaseAuth.getInstance().getCurrentUser();
         String userId = user.getUid();
         DatabaseReference dbRef = FirebaseDatabase.getInstance().getReference();
-        Log.d("hello", "HELP");
-        Log.d("hello", "HELP");
-        Log.d("hello", "HELP");
-        Log.d("hello", "HELP");
-        Log.d("hello", "HELP");
-        Log.d("hello", "HELP");
-        Log.d("hello", "HELP");
-        Log.d("hello", "HELP");
-        Log.d("hello", "HELP");
-        Log.d("hello", "HELP");
-        Log.d("hello", "HELP");
-        Log.d("hello", "HELP");
-        Log.d("hello", "HELP");
-        Log.d("hello", "HELP");
-        Log.d("hello", "HELP");
-        Log.d("hello", "HELP");
-        Log.d("hello", "HELP");
-        Log.d("hello", "HELP");
-        Log.d("hello", "HELP");
-        Log.d("hello", "HELP");
-        Log.d("hello", "HELP");
-        Log.d("hello", "HELP");
-        Log.d("hello", "HELP");
-        Log.d("hello", "HELP");
-        Log.d("hello", "HELP");
-        Log.d("hello", "HELP");
-        Log.d("hello", "HELP");
-        Log.d("hello", "HELP");
 
         if (myLocation != null) {
             myLocation.remove();
diff --git a/src/main/java/com/example/liliyayankova/unirides/User_Main.java b/src/main/java/com/example/liliyayankova/unirides/User_Main.java
index 69da4df2f74aba9a9f26564e248f5bcee8a7b042..0c72e6f95965ca57a3d7e4a0fbc8d6fc9d47b5ec 100644
--- a/src/main/java/com/example/liliyayankova/unirides/User_Main.java
+++ b/src/main/java/com/example/liliyayankova/unirides/User_Main.java
@@ -35,6 +35,8 @@ public class User_Main extends AppCompatActivity {
             Log.e("TOOLBAR", e.toString());
         }
 
+        Toast.makeText(User_Main.this, "To access the navbar, swipe from the left side of the screen.", Toast.LENGTH_LONG).show();
+
         ImageButton map_button = findViewById(R.id.view_route_button);
         map_button.setOnClickListener(new View.OnClickListener() {
             @Override
diff --git a/src/main/java/com/example/liliyayankova/unirides/ViewRoutes.java b/src/main/java/com/example/liliyayankova/unirides/ViewRoutes.java
index 80490d2af89e3cd6ebeea391a1872652f81031fa..0552bb6e690c0b15776923eed34f13ac7bda9b9c 100644
--- a/src/main/java/com/example/liliyayankova/unirides/ViewRoutes.java
+++ b/src/main/java/com/example/liliyayankova/unirides/ViewRoutes.java
@@ -1,8 +1,17 @@
 package com.example.liliyayankova.unirides;
 
+import android.Manifest;
 import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.graphics.Color;
+import android.location.Location;
+import android.location.LocationManager;
+import android.os.Build;
 import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
 import android.support.design.widget.NavigationView;
+import android.support.v4.app.ActivityCompat;
+import android.support.v4.content.ContextCompat;
 import android.support.v4.widget.DrawerLayout;
 import android.support.v7.app.ActionBarDrawerToggle;
 import android.support.v7.app.AppCompatActivity;
@@ -15,10 +24,56 @@ import android.view.MenuItem;
 import android.view.View;
 import android.widget.Toast;
 
-public class ViewRoutes extends AppCompatActivity {
+import com.google.android.gms.common.ConnectionResult;
+import com.google.android.gms.common.api.GoogleApiClient;
+import com.google.android.gms.location.LocationListener;
+import com.google.android.gms.location.LocationRequest;
+import com.google.android.gms.location.LocationServices;
+import com.google.android.gms.maps.CameraUpdateFactory;
+import com.google.android.gms.maps.GoogleMap;
+import com.google.android.gms.maps.OnMapReadyCallback;
+import com.google.android.gms.maps.SupportMapFragment;
+import com.google.android.gms.maps.model.BitmapDescriptorFactory;
+import com.google.android.gms.maps.model.LatLng;
+import com.google.android.gms.maps.model.Marker;
+import com.google.android.gms.maps.model.MarkerOptions;
+import com.google.android.gms.maps.model.Polyline;
+import com.google.android.gms.maps.model.PolylineOptions;
+import com.google.firebase.FirebaseApp;
+import com.google.firebase.auth.FirebaseAuth;
+import com.google.firebase.auth.FirebaseUser;
+import com.google.firebase.database.DataSnapshot;
+import com.google.firebase.database.DatabaseError;
+import com.google.firebase.database.DatabaseReference;
+import com.google.firebase.database.FirebaseDatabase;
+import com.google.firebase.database.ValueEventListener;
+import com.google.maps.android.SphericalUtil;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class ViewRoutes extends AppCompatActivity implements
+        OnMapReadyCallback,
+        GoogleApiClient.ConnectionCallbacks,
+        GoogleApiClient.OnConnectionFailedListener,
+        LocationListener {
 
     //variables
     private boolean isDriver;
+    LocationManager locationManager;
+    private GoogleMap mMap;
+    private GoogleApiClient mGoogleApiClient;
+    private LocationRequest mLocationRequest;
+    private Location currentLocation;
+    private static final int REQUEST_USER_LOCATION_CODE = 99;
+    private FirebaseAuth mFirebaseAuth;
+    private FirebaseDatabase mFirebaseDatabase;
+    private DatabaseReference mLocationDatabaseReference;
+    private Marker start_marker;
+    private Marker end_marker;
+    private String driver_id;
+    private List<String> routes_start;
+    private List<String> routes_end;
 
     //UI
     private DrawerLayout dl;
@@ -29,11 +84,35 @@ public class ViewRoutes extends AppCompatActivity {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_view_routes);
 
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
+            checkUserLocationPermission();
+        }
+        // Obtain the SupportMapFragment and get notified when the map is ready to be used.
+        SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
+                .findFragmentById(R.id.map);
+        mapFragment.getMapAsync(this);
+
+        FirebaseApp.initializeApp(this);
+        mFirebaseDatabase = FirebaseDatabase.getInstance();
+        mLocationDatabaseReference = mFirebaseDatabase.getReference().child("drivers");
+
+
+        //TODO: for testing, remove this after joining activities are done
+        driver_id = "Qg5xwj3cE9PexRlGdfmCdcU6bq73";
+
+        currentLocation = new Location("dummyprovider");
+
+
+        locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);
+
         /*
          * assume the user is a passenger (isDriver = false) unless bundle extra userType value is DRIVER
          */
         isDriver = false;
 
+        routes_start = new ArrayList<>();
+        routes_end = new ArrayList<>();
+
         /* checking if there are any bundle extras (should be the userType) */
         if (getIntent().getExtras() != null) {
             //setting userType to this result (DRIVER or PASSENGER)
@@ -41,6 +120,10 @@ public class ViewRoutes extends AppCompatActivity {
                 isDriver = true;
             }
 
+            if(getIntent().getExtras().get("driver_id") != null){
+                driver_id = getIntent().getExtras().get("driver_id").toString();
+            }
+
         }
 
         //setting the user_toolbar layout as the action bar
@@ -118,8 +201,226 @@ public class ViewRoutes extends AppCompatActivity {
                 }
             });
 
+
+
+    }
+
+    @Override
+    public void onMapReady(GoogleMap googleMap) {
+        mMap = googleMap;
+
+        if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)
+                == PackageManager.PERMISSION_GRANTED) {
+
+            buildGoogleApiClient();
+
+            mMap.setMyLocationEnabled(true);
+
+        }
+
+    }
+
+
+    public void setupMarkers(){
+
+        //adding all the start markers for every driver route
+        for(int i = 0; i < routes_start.size(); i++){
+
+            MarkerOptions start = new MarkerOptions();
+            start.position(convertToLatLng(routes_start.get(i)));
+            start.title("Start of Route " + i);
+            start.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));
+            mMap.addMarker(start);
+
+        }
+
+        //adding all the end markers for every driver route
+        for(int i = 0; i < routes_end.size(); i++){
+
+            MarkerOptions end = new MarkerOptions();
+            end.position(convertToLatLng(routes_end.get(i)));
+            end.title("End of Route " + i);
+            end.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED));
+            mMap.addMarker(end);
+
+        }
+
+        for(int i = 0; i < routes_start.size(); i++){
+            Polyline line = mMap.addPolyline(new PolylineOptions()
+                    .add(convertToLatLng(routes_start.get(i)), convertToLatLng(routes_end.get(i)))
+                    .width(5)
+                    .color(Color.RED));
+        }
+
+
+    }
+
+    public LatLng convertToLatLng(String location){
+
+        //converting location string to individual lat lang values
+        String s1 = "";
+        String s2 = "";
+        boolean islat = true;
+        int j = 0;
+        for (int i = 0; i < location.length(); i++) {
+            if (location.charAt(i) == ',') {
+                islat = false;
+            }
+            if (islat) {
+                s1 += location.charAt(i);
+            } else {
+                j++;
+            }
+            if (!islat && j > 2) {
+                s2 += location.charAt(i);
+            }
+        }
+
+        LatLng latlng = new LatLng(Double.parseDouble(s1), Double.parseDouble(s2));
+        return latlng;
+
+    }
+
+    public boolean checkUserLocationPermission() {
+        if (ContextCompat.checkSelfPermission(this,
+                Manifest.permission.ACCESS_FINE_LOCATION)
+                != PackageManager.PERMISSION_GRANTED) {
+            if (ActivityCompat.shouldShowRequestPermissionRationale(this,
+                    Manifest.permission.ACCESS_FINE_LOCATION)) {
+                ActivityCompat.requestPermissions(this, new String[]
+                        {Manifest.permission.ACCESS_FINE_LOCATION}, REQUEST_USER_LOCATION_CODE);
+            } else {
+                ActivityCompat.requestPermissions(this, new String[]
+                        {Manifest.permission.ACCESS_FINE_LOCATION}, REQUEST_USER_LOCATION_CODE);
+            }
+            return false;
+        } else {
+            return true;
+        }
+    }
+
+    @Override
+    public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,
+                                           @NonNull int[] grantResults) {
+        switch (requestCode) {
+            case REQUEST_USER_LOCATION_CODE:
+                if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
+                    if (ContextCompat.checkSelfPermission(this,
+                            Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {
+                        if (mGoogleApiClient == null) {
+                            buildGoogleApiClient();
+                        }
+                        mMap.setMyLocationEnabled(true);
+                    }
+                } else {
+                    Toast.makeText(this, "Permission Denied.", Toast.LENGTH_SHORT).show();
+                }
+                return;
+        }
+    }
+
+    protected synchronized void buildGoogleApiClient() {
+        mGoogleApiClient = new GoogleApiClient.Builder(this)
+                .addConnectionCallbacks(this)
+                .addOnConnectionFailedListener(this)
+                .addApi(LocationServices.API)
+                .build();
+
+        mGoogleApiClient.connect();
     }
 
+    @Override
+    public void onLocationChanged(Location location) {
+        currentLocation = location;
+        FirebaseUser user = mFirebaseAuth.getInstance().getCurrentUser();
+        String userId = user.getUid();
+        DatabaseReference dbRef = FirebaseDatabase.getInstance().getReference();
+
+        if (isDriver) {
+            dbRef.child("drivers").child(userId).child("latitude").setValue(currentLocation.getLatitude());
+            dbRef.child("drivers").child(userId).child("longitude").setValue(currentLocation.getLongitude());
+        }
+
+        LatLng latLng = new LatLng(location.getLatitude(), location.getLongitude());
+
+        /* Updated this part so that it zooms in on the location, as it was buggy with me, I've left
+         * the original code commented out as it may be useful for if your location is updated?
+         * Either way this works for me at the moment & doesn't default me to the ocean lmao - James
+         */
+        float zoomLevel = 15.0f;
+        mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLng, zoomLevel));
+        //mMap.animateCamera(CameraUpdateFactory.zoomBy(10));
+
+        final DatabaseReference rootRef = FirebaseDatabase.getInstance().getReference();
+        final DatabaseReference usernameRef;
+
+        usernameRef = rootRef.child("routes");
+        usernameRef.addListenerForSingleValueEvent(new ValueEventListener() {
+            @Override
+            public void onDataChange(DataSnapshot snapshot) {
+
+                for(int i = 0; i < snapshot.getChildrenCount(); i++){
+                    //Toast.makeText(ViewRoutes.this, snapshot.child(Integer.toString(i)).child("user").getValue() + "", Toast.LENGTH_SHORT).show();
+                    //Toast.makeText(ViewRoutes.this, driver_id, Toast.LENGTH_SHORT).show();
+                    //checks all the routes for a route that belongs to the driver being viewed
+
+                    if((snapshot.child(Integer.toString(i)).child("user").getValue() + "").equals(driver_id)){
+                        //Toast.makeText(ViewRoutes.this, "equal", Toast.LENGTH_SHORT).show();
+
+                        String start = snapshot.child(Integer.toString(i)).child("location_start").getValue().toString();
+                        String end = snapshot.child(Integer.toString(i)).child("location_end").getValue().toString();
+                        //Toast.makeText(ViewRoutes.this, "routes: " + start + " -> " + end, Toast.LENGTH_SHORT).show();
+                        routes_start.add(start);
+                        routes_end.add(end);
+                    }
+
+                }
+
+                setupMarkers();
+
+            }
+
+            @Override
+            public void onCancelled(DatabaseError databaseError) {
+                Log.d("Firebase Error!", databaseError.getMessage()); //Don't ignore errors!
+            }
+        });
+
+
+
+        if (mGoogleApiClient != null) {
+            LocationServices.FusedLocationApi.removeLocationUpdates(mGoogleApiClient, this);
+
+        }
+    }
+
+    @Override
+    public void onConnected(@Nullable Bundle bundle) {
+        mLocationRequest = new LocationRequest();
+        mLocationRequest.setInterval(1000);
+        mLocationRequest.setFastestInterval(1000);
+        mLocationRequest.setPriority(LocationRequest.PRIORITY_BALANCED_POWER_ACCURACY);
+
+        if (ContextCompat.checkSelfPermission(this,
+                Manifest.permission.ACCESS_FINE_LOCATION)
+                == PackageManager.PERMISSION_GRANTED) {
+            LocationServices.FusedLocationApi.requestLocationUpdates(mGoogleApiClient,
+                    mLocationRequest, this);
+        }
+    }
+
+    @Override
+    public void onConnectionSuspended(int i) {
+
+    }
+
+    @Override
+    public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {
+
+    }
+
+
+
     //Override for the user_toolbar menu items
     @Override
     public boolean onCreateOptionsMenu(Menu menu) {
@@ -152,4 +453,6 @@ public class ViewRoutes extends AppCompatActivity {
 
         return super.onOptionsItemSelected(item);
     }
+
+
 }
diff --git a/src/main/res/layout/activity_driver__profile__passenger__view.xml b/src/main/res/layout/activity_driver__profile__passenger__view.xml
new file mode 100644
index 0000000000000000000000000000000000000000..6d3bb7e3f35e1006e1aac1f78219a63d2ae201a4
--- /dev/null
+++ b/src/main/res/layout/activity_driver__profile__passenger__view.xml
@@ -0,0 +1,185 @@
+<android.support.v4.widget.DrawerLayout xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:id="@+id/dl">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="vertical"
+        tools:context=".Driver_Profile">
+
+        <include
+            android:id="@+id/toolbar"
+            layout="@layout/user_toolbar" />
+
+        <TextView
+            android:id="@+id/profile_text"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_margin="20dp"
+            android:gravity="center"
+            android:text="@string/driver_profile"
+            android:textSize="30sp" />
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="212dp"
+            android:orientation="horizontal">
+
+            <ImageView
+                android:id="@+id/profile_image"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:contentDescription="@string/profile"
+                app:srcCompat="@drawable/icon_users" />
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_weight="1"
+                android:orientation="vertical">
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:orientation="horizontal">
+
+                    <TextView
+                        android:id="@+id/textViewName"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="Name" />
+
+                    <TextView
+                        android:id="@+id/textViewLastName"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:paddingStart="10dip"
+                        android:text="last name" />
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:orientation="horizontal">
+
+                    <TextView
+                        android:id="@+id/textAge"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="@string/edit_age" />
+
+                    <TextView
+                        android:id="@+id/textViewAge"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:paddingStart="10dip"
+                        android:text="age" />
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:orientation="horizontal">
+
+                    <TextView
+                        android:id="@+id/timeDriving"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:text="@string/edit_driving" />
+
+                    <TextView
+                        android:id="@+id/textViewDriving"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_weight="1"
+                        android:paddingStart="10dip"
+                        android:text="TextView" />
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:orientation="horizontal">
+
+                    <TextView
+                        android:id="@+id/textViewLicenseThing"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_weight="0"
+                        android:text="@string/edit_license_plate" />
+
+                    <TextView
+                        android:id="@+id/textViewLicense"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:paddingLeft="10dip"
+                        android:text="License Plate" />
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:orientation="horizontal">
+
+                    <TextView
+                        android:id="@+id/model"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_weight="0"
+                        android:text="@string/edit_model" />
+
+                    <TextView
+                        android:id="@+id/textViewModel"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_weight="0"
+                        android:text="model"
+                        android:paddingStart="10dip"/>
+                </LinearLayout>
+
+            </LinearLayout>
+
+        </LinearLayout>
+
+        <Button
+            android:id="@+id/rateButton"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="Rate Driver" />
+
+
+        <Button
+            android:id="@+id/viewRoutesButton"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="@string/view_routes" />
+
+        <Button
+            android:id="@+id/backButton"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="BACK" />
+
+        <ImageView
+            android:id="@+id/picture_taken1"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_marginHorizontal="100dp"
+            android:visibility="visible"
+            tools:visibility="visible" />
+
+    </LinearLayout>
+    <android.support.design.widget.NavigationView
+        android:layout_width="wrap_content"
+        android:layout_height="match_parent"
+        app:menu="@menu/navbar_menu"
+        android:layout_gravity="start"
+        android:id="@+id/nav_view">
+
+    </android.support.design.widget.NavigationView>
+</android.support.v4.widget.DrawerLayout>
\ No newline at end of file
diff --git a/src/main/res/layout/activity_view_routes.xml b/src/main/res/layout/activity_view_routes.xml
index 4d1869437cc3a1937450fe2a48c114ca3979b8f1..5ad9b40ebaefcce01e5b0afbae96066556ba219b 100644
--- a/src/main/res/layout/activity_view_routes.xml
+++ b/src/main/res/layout/activity_view_routes.xml
@@ -1,9 +1,36 @@
-<?xml version="1.0" encoding="utf-8"?>
-<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:layout_width="match_parent"
+<android.support.v4.widget.DrawerLayout android:layout_width="match_parent"
     android:layout_height="match_parent"
-    tools:context=".ViewRoutes">
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:id="@+id/dl">
+
+    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+        xmlns:tools="http://schemas.android.com/tools"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:gravity="center"
+        android:orientation="vertical"
+        tools:context=".Map">
+
+        <include
+            android:id="@+id/toolbar"
+            layout="@layout/user_toolbar" />
+
+        <fragment
+            android:id="@+id/map"
+            android:name="com.google.android.gms.maps.SupportMapFragment"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            tools:context=".Map" />
+
+    </LinearLayout>
+
+    <android.support.design.widget.NavigationView
+        android:layout_width="wrap_content"
+        android:layout_height="match_parent"
+        app:menu="@menu/navbar_menu"
+        android:layout_gravity="start"
+        android:id="@+id/nav_view">
 
-</android.support.constraint.ConstraintLayout>
\ No newline at end of file
+    </android.support.design.widget.NavigationView>
+</android.support.v4.widget.DrawerLayout>
\ No newline at end of file