diff --git a/.gitignore b/.gitignore
index 0c91c311c1e283cf08d9d8114c66395724ec2c2f..9b3a53d01d2798ddefac82b89c08651a36bfda93 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
 .metadata
 *.tmp
+*.swp
 
 # Windows thumbnail db
 Thumbs.db
@@ -8,14 +9,15 @@ Thumbs.db
 .DS_Store
 
 # Eclipse project files
-.classpath
-.project
+#.classpath
+#.project
 
 # Local configuration file (sdk path, etc)
 local.properties
 
 # Android Studio
 .idea
+!.idea/codeStyleSettings.xml
 .gradle
-build
+build/
 *.iml
diff --git a/briar-android/briar-android.iml b/briar-android/briar-android.iml
deleted file mode 100644
index c465a22dca8094e080d71df7c153fd1d67f7cf8b..0000000000000000000000000000000000000000
--- a/briar-android/briar-android.iml
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module external.linked.project.id=":briar-android" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="briar" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
-  <component name="FacetManager">
-    <facet type="android-gradle" name="Android-Gradle">
-      <configuration>
-        <option name="GRADLE_PROJECT_PATH" value=":briar-android" />
-      </configuration>
-    </facet>
-    <facet type="android" name="Android">
-      <configuration>
-        <option name="SELECTED_BUILD_VARIANT" value="debug" />
-        <option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
-        <option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
-        <option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
-        <option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugAndroidTest" />
-        <option name="COMPILE_JAVA_TEST_TASK_NAME" value="compileDebugAndroidTestSources" />
-        <afterSyncTasks>
-          <task>generateDebugAndroidTestSources</task>
-          <task>generateDebugSources</task>
-        </afterSyncTasks>
-        <option name="ALLOW_USER_CONFIGURATION" value="false" />
-        <option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/res" />
-      </configuration>
-    </facet>
-  </component>
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
-    <output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
-    <output-test url="file://$MODULE_DIR$/build/intermediates/classes/androidTest/debug" />
-    <exclude-output />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/debug" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/debug" isTestSource="true" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/debug" isTestSource="true" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/debug" isTestSource="true" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/debug" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/build-types/debug/res" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/build-types/debug/resources" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/build-types/debug/assets" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/build-types/debug/aidl" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/build-types/debug/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/build-types/debug/jni" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/build-types/debug/rs" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/res" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/assets" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
-      <excludeFolder url="file://$MODULE_DIR$/build/outputs" />
-      <excludeFolder url="file://$MODULE_DIR$/build/tmp" />
-    </content>
-    <orderEntry type="jdk" jdkName="Android API 23 Platform" jdkType="Android SDK" />
-    <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="library" exported="" name="android-support-v4" level="project" />
-    <orderEntry type="library" exported="" name="jtorctl-briar" level="project" />
-    <orderEntry type="library" exported="" name="roboguice-2.0" level="project" />
-    <orderEntry type="library" exported="" name="jsocks" level="project" />
-    <orderEntry type="library" exported="" name="guice-3.0-no_aop" level="project" />
-    <orderEntry type="library" exported="" name="spongy-core-1.53" level="project" />
-    <orderEntry type="library" exported="" name="h2small-1.4.190" level="project" />
-    <orderEntry type="library" exported="" name="javax.inject" level="project" />
-    <orderEntry type="library" exported="" name="weupnp-0.1.3-SNAPSHOT-briar" level="project" />
-    <orderEntry type="module" module-name="briar-api" exported="" />
-    <orderEntry type="module" module-name="briar-core" exported="" />
-  </component>
-</module>
\ No newline at end of file
diff --git a/briar-api/briar-api.iml b/briar-api/briar-api.iml
deleted file mode 100644
index 3d154955e7a70a77e4fb68e7ea73656de97d2456..0000000000000000000000000000000000000000
--- a/briar-api/briar-api.iml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module external.linked.project.id=":briar-api" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="briar" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
-  <component name="FacetManager">
-    <facet type="android-gradle" name="Android-Gradle">
-      <configuration>
-        <option name="GRADLE_PROJECT_PATH" value=":briar-api" />
-      </configuration>
-    </facet>
-    <facet type="java-gradle" name="Java-Gradle">
-      <configuration>
-        <option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
-        <option name="BUILDABLE" value="true" />
-      </configuration>
-    </facet>
-  </component>
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
-    <output url="file://$MODULE_DIR$/build/classes/main" />
-    <output-test url="file://$MODULE_DIR$/build/classes/test" />
-    <exclude-output />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
-      <excludeFolder url="file://$MODULE_DIR$/.gradle" />
-      <excludeFolder url="file://$MODULE_DIR$/build" />
-    </content>
-    <orderEntry type="inheritedJdk" />
-    <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="library" exported="" name="guice-3.0-no_aop" level="project" />
-    <orderEntry type="library" exported="" name="javax.inject" level="project" />
-  </component>
-</module>
\ No newline at end of file
diff --git a/briar-core/briar-core.iml b/briar-core/briar-core.iml
deleted file mode 100644
index 0cd707f81f13ff30110583832e5427826aef2791..0000000000000000000000000000000000000000
--- a/briar-core/briar-core.iml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module external.linked.project.id=":briar-core" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="briar" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
-  <component name="FacetManager">
-    <facet type="android-gradle" name="Android-Gradle">
-      <configuration>
-        <option name="GRADLE_PROJECT_PATH" value=":briar-core" />
-      </configuration>
-    </facet>
-    <facet type="java-gradle" name="Java-Gradle">
-      <configuration>
-        <option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
-        <option name="BUILDABLE" value="true" />
-      </configuration>
-    </facet>
-  </component>
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
-    <output url="file://$MODULE_DIR$/build/classes/main" />
-    <output-test url="file://$MODULE_DIR$/build/classes/test" />
-    <exclude-output />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
-      <excludeFolder url="file://$MODULE_DIR$/.gradle" />
-      <excludeFolder url="file://$MODULE_DIR$/build" />
-    </content>
-    <orderEntry type="inheritedJdk" />
-    <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="module" module-name="briar-api" exported="" />
-    <orderEntry type="library" exported="" name="guice-3.0-no_aop" level="project" />
-    <orderEntry type="library" exported="" name="javax.inject" level="project" />
-    <orderEntry type="library" exported="" name="h2small-1.4.190" level="project" />
-    <orderEntry type="library" exported="" name="spongy-core-1.53" level="project" />
-    <orderEntry type="library" exported="" name="weupnp-0.1.3-SNAPSHOT-briar" level="project" />
-  </component>
-</module>
\ No newline at end of file
diff --git a/briar-desktop/briar-desktop.iml b/briar-desktop/briar-desktop.iml
deleted file mode 100644
index ea72f302e7389b70333f4af0495a68eb46abccfe..0000000000000000000000000000000000000000
--- a/briar-desktop/briar-desktop.iml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module external.linked.project.id=":briar-desktop" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="briar" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
-  <component name="FacetManager">
-    <facet type="android-gradle" name="Android-Gradle">
-      <configuration>
-        <option name="GRADLE_PROJECT_PATH" value=":briar-desktop" />
-      </configuration>
-    </facet>
-    <facet type="java-gradle" name="Java-Gradle">
-      <configuration>
-        <option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
-        <option name="BUILDABLE" value="true" />
-      </configuration>
-    </facet>
-  </component>
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
-    <output url="file://$MODULE_DIR$/build/classes/main" />
-    <output-test url="file://$MODULE_DIR$/build/classes/test" />
-    <exclude-output />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
-      <excludeFolder url="file://$MODULE_DIR$/.gradle" />
-      <excludeFolder url="file://$MODULE_DIR$/build" />
-    </content>
-    <orderEntry type="inheritedJdk" />
-    <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="module" module-name="briar-api" exported="" />
-    <orderEntry type="module" module-name="briar-core" exported="" />
-    <orderEntry type="library" exported="" name="guice-3.0-no_aop" level="project" />
-    <orderEntry type="library" exported="" name="javax.inject" level="project" />
-    <orderEntry type="library" exported="" name="h2small-1.4.190" level="project" />
-    <orderEntry type="library" exported="" name="spongy-core-1.53" level="project" />
-    <orderEntry type="library" exported="" name="weupnp-0.1.3-SNAPSHOT-briar" level="project" />
-    <orderEntry type="library" exported="" name="bluecove-2.1.1-SNAPSHOT-briar" level="project" />
-    <orderEntry type="library" exported="" name="jna-4.1.0" level="project" />
-    <orderEntry type="library" exported="" name="jna-platform-4.1.0" level="project" />
-    <orderEntry type="library" exported="" name="jnotify-0.94" level="project" />
-    <orderEntry type="library" exported="" name="bluecove-gpl-2.1.1-SNAPSHOT" level="project" />
-    <orderEntry type="library" exported="" name="jssc-0.9-briar" level="project" />
-  </component>
-</module>
\ No newline at end of file
diff --git a/briar-tests/briar-tests.iml b/briar-tests/briar-tests.iml
deleted file mode 100644
index 83fdb9b9fe463399ffa707425e516accfc44ee19..0000000000000000000000000000000000000000
--- a/briar-tests/briar-tests.iml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module external.linked.project.id=":briar-tests" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="briar" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
-  <component name="FacetManager">
-    <facet type="android-gradle" name="Android-Gradle">
-      <configuration>
-        <option name="GRADLE_PROJECT_PATH" value=":briar-tests" />
-      </configuration>
-    </facet>
-    <facet type="java-gradle" name="Java-Gradle">
-      <configuration>
-        <option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
-        <option name="BUILDABLE" value="true" />
-      </configuration>
-    </facet>
-  </component>
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
-    <output url="file://$MODULE_DIR$/build/classes/main" />
-    <output-test url="file://$MODULE_DIR$/build/classes/test" />
-    <exclude-output />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="true" />
-      <excludeFolder url="file://$MODULE_DIR$/.gradle" />
-      <excludeFolder url="file://$MODULE_DIR$/build" />
-    </content>
-    <orderEntry type="inheritedJdk" />
-    <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="module" module-name="briar-api" exported="" />
-    <orderEntry type="module" module-name="briar-core" exported="" />
-    <orderEntry type="module" module-name="briar-desktop" exported="" />
-    <orderEntry type="library" exported="" name="guice-3.0-no_aop" level="project" />
-    <orderEntry type="library" exported="" name="javax.inject" level="project" />
-    <orderEntry type="library" exported="" name="h2small-1.4.190" level="project" />
-    <orderEntry type="library" exported="" name="spongy-core-1.53" level="project" />
-    <orderEntry type="library" exported="" name="weupnp-0.1.3-SNAPSHOT-briar" level="project" />
-    <orderEntry type="library" exported="" name="bluecove-2.1.1-SNAPSHOT-briar" level="project" />
-    <orderEntry type="library" exported="" name="jna-4.1.0" level="project" />
-    <orderEntry type="library" exported="" name="jna-platform-4.1.0" level="project" />
-    <orderEntry type="library" exported="" name="jnotify-0.94" level="project" />
-    <orderEntry type="library" exported="" name="bluecove-gpl-2.1.1-SNAPSHOT" level="project" />
-    <orderEntry type="library" exported="" name="jssc-0.9-briar" level="project" />
-    <orderEntry type="library" exported="" name="junit-4.9b3" level="project" />
-    <orderEntry type="library" exported="" name="jmock-2.5.1" level="project" />
-    <orderEntry type="library" exported="" name="hamcrest-core-1.1" level="project" />
-    <orderEntry type="library" exported="" name="hamcrest-library-1.1" level="project" />
-  </component>
-</module>
\ No newline at end of file