diff --git a/.gitignore b/.gitignore
index 8ecf536e79a5fc7bafe2d5351b05830b8492e6e7..05afbb5e5ed696a376b9b2f29b80ae31c9be6ce7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,8 +17,6 @@ cache
 work/
 out/
 .DS_Store
-third_party/libmesos.so
-third_party/libmesos.dylib
 build/apache-maven*
 build/zinc*
 build/scala*
@@ -60,7 +58,6 @@ dev/create-release/*final
 spark-*-bin-*.tgz
 unit-tests.log
 /lib/
-rat-results.txt
 scalastyle.txt
 scalastyle-output.xml
 R-unit-tests.log
diff --git a/.rat-excludes b/dev/.rat-excludes
similarity index 100%
rename from .rat-excludes
rename to dev/.rat-excludes
diff --git a/dev/check-license b/dev/check-license
index 10740cfdc5242b2f5c1199f11a773131818ecf42..678e73fd60f1f5723b93d0485b65ca44cae455fb 100755
--- a/dev/check-license
+++ b/dev/check-license
@@ -58,7 +58,7 @@ else
     declare java_cmd=java
 fi
 
-export RAT_VERSION=0.10
+export RAT_VERSION=0.11
 export rat_jar="$FWDIR"/lib/apache-rat-${RAT_VERSION}.jar
 mkdir -p "$FWDIR"/lib
 
@@ -67,14 +67,15 @@ mkdir -p "$FWDIR"/lib
     exit 1
 }
 
-$java_cmd -jar "$rat_jar" -E "$FWDIR"/.rat-excludes  -d "$FWDIR" > rat-results.txt
+mkdir target
+$java_cmd -jar "$rat_jar" -E "$FWDIR"/dev/.rat-excludes -d "$FWDIR" > target/rat-results.txt
 
 if [ $? -ne 0 ]; then
    echo "RAT exited abnormally"
    exit 1
 fi
 
-ERRORS="$(cat rat-results.txt | grep -e "??")"
+ERRORS="$(cat target/rat-results.txt | grep -e "??")"
 
 if test ! -z "$ERRORS"; then 
     echo "Could not find Apache license headers in the following files:"
diff --git a/checkstyle-suppressions.xml b/dev/checkstyle-suppressions.xml
similarity index 100%
rename from checkstyle-suppressions.xml
rename to dev/checkstyle-suppressions.xml
diff --git a/checkstyle.xml b/dev/checkstyle.xml
similarity index 100%
rename from checkstyle.xml
rename to dev/checkstyle.xml
diff --git a/dev/create-release/release-build.sh b/dev/create-release/release-build.sh
index c08b6d7de6fe028c3c6fe67b5bcabea4f9b4c319..65e80fc76056a229b8d7f874ca070fc0dc71c31d 100755
--- a/dev/create-release/release-build.sh
+++ b/dev/create-release/release-build.sh
@@ -165,7 +165,7 @@ if [[ "$1" == "package" ]]; then
     # Get maven home set by MVN
     MVN_HOME=`$MVN -version 2>&1 | grep 'Maven home' | awk '{print $NF}'`
 
-    ./make-distribution.sh --name $NAME --mvn $MVN_HOME/bin/mvn --tgz $FLAGS \
+    ./dev/make-distribution.sh --name $NAME --mvn $MVN_HOME/bin/mvn --tgz $FLAGS \
       -DzincPort=$ZINC_PORT 2>&1 >  ../binary-release-$NAME.log
     cd ..
     cp spark-$SPARK_VERSION-bin-$NAME/spark-$SPARK_VERSION-bin-$NAME.tgz .
diff --git a/dev/lint-python b/dev/lint-python
index 068337d273f82020c36d3121b8c83b21d2da8f02..477ac0ef6d294542b9786c6ee30f7ea1383e5a7c 100755
--- a/dev/lint-python
+++ b/dev/lint-python
@@ -37,7 +37,7 @@ compile_status="${PIPESTATUS[0]}"
 #+ See: https://github.com/apache/spark/pull/1744#issuecomment-50982162
 #+ TODOs:
 #+  - Download pep8 from PyPI. It's more "official".
-PEP8_VERSION="1.6.2"
+PEP8_VERSION="1.7.0"
 PEP8_SCRIPT_PATH="$SPARK_ROOT_DIR/dev/pep8-$PEP8_VERSION.py"
 PEP8_SCRIPT_REMOTE_PATH="https://raw.githubusercontent.com/jcrocholl/pep8/$PEP8_VERSION/pep8.py"
 
@@ -80,7 +80,7 @@ export "PATH=$PYTHONPATH:$PATH"
 #+ first, but we do so so that the check status can
 #+ be output before the report, like with the
 #+ scalastyle and RAT checks.
-python "$PEP8_SCRIPT_PATH" --ignore=E402,E731,E241,W503,E226 $PATHS_TO_CHECK >> "$PEP8_REPORT_PATH"
+python "$PEP8_SCRIPT_PATH" --ignore=E402,E731,E241,W503,E226 --config=dev/tox.ini $PATHS_TO_CHECK >> "$PEP8_REPORT_PATH"
 pep8_status="${PIPESTATUS[0]}"
 
 if [ "$compile_status" -eq 0 -a "$pep8_status" -eq 0 ]; then
@@ -122,7 +122,7 @@ fi
 
 # for to_be_checked in "$PATHS_TO_CHECK"
 # do
-#     pylint --rcfile="$SPARK_ROOT_DIR/pylintrc" $to_be_checked >> "$PYLINT_REPORT_PATH"
+#     pylint --rcfile="$SPARK_ROOT_DIR/python/pylintrc" $to_be_checked >> "$PYLINT_REPORT_PATH"
 # done
 
 # if [ "${PIPESTATUS[0]}" -ne 0 ]; then
diff --git a/make-distribution.sh b/dev/make-distribution.sh
similarity index 97%
rename from make-distribution.sh
rename to dev/make-distribution.sh
index ac90ea317a6fcc14c1762bc7cc50b98badc6aacf..ac4e9b90f01777a3573125389e5ddae7f806e9d9 100755
--- a/make-distribution.sh
+++ b/dev/make-distribution.sh
@@ -29,7 +29,7 @@ set -e
 set -x
 
 # Figure out where the Spark framework is installed
-SPARK_HOME="$(cd "`dirname "$0"`"; pwd)"
+SPARK_HOME="$(cd "`dirname "$0"`/.."; pwd)"
 DISTDIR="$SPARK_HOME/dist"
 
 MAKE_TGZ=false
@@ -41,7 +41,7 @@ function exit_with_usage {
   echo ""
   echo "usage:"
   cl_options="[--name] [--tgz] [--mvn <mvn-command>]"
-  echo "./make-distribution.sh $cl_options <maven build options>"
+  echo "make-distribution.sh $cl_options <maven build options>"
   echo "See Spark's \"Building Spark\" doc for correct Maven options."
   echo ""
   exit 1
@@ -104,7 +104,7 @@ fi
 if [ $(command -v git) ]; then
     GITREV=$(git rev-parse --short HEAD 2>/dev/null || :)
     if [ ! -z "$GITREV" ]; then
-	 GITREVSTRING=" (git revision $GITREV)"
+        GITREVSTRING=" (git revision $GITREV)"
     fi
     unset GITREV
 fi
diff --git a/tox.ini b/dev/tox.ini
similarity index 100%
rename from tox.ini
rename to dev/tox.ini
diff --git a/docs/building-spark.md b/docs/building-spark.md
index adf798847c3c3321bf25b18139810a77fccd8ac7..2c6294133e8633d42bae3471f0500cd3ff4d3be3 100644
--- a/docs/building-spark.md
+++ b/docs/building-spark.md
@@ -35,12 +35,12 @@ to the `sharedSettings` val. See also [this PR](https://github.com/apache/spark/
 
 To create a Spark distribution like those distributed by the
 [Spark Downloads](http://spark.apache.org/downloads.html) page, and that is laid out so as
-to be runnable, use `make-distribution.sh` in the project root directory. It can be configured
+to be runnable, use `./dev/make-distribution.sh` in the project root directory. It can be configured
 with Maven profile settings and so on like the direct Maven build. Example:
 
-    ./make-distribution.sh --name custom-spark --tgz -Psparkr -Phadoop-2.4 -Phive -Phive-thriftserver -Pyarn
+    ./dev/make-distribution.sh --name custom-spark --tgz -Psparkr -Phadoop-2.4 -Phive -Phive-thriftserver -Pyarn
 
-For more information on usage, run `./make-distribution.sh --help`
+For more information on usage, run `./dev/make-distribution.sh --help`
 
 # Setting up Maven's Memory Usage
 
diff --git a/docs/running-on-mesos.md b/docs/running-on-mesos.md
index 9816d030e90ac981396c09cbcbca3780f68546c4..912a0108129c2dc0b9007bc740ba291342cb9e3b 100644
--- a/docs/running-on-mesos.md
+++ b/docs/running-on-mesos.md
@@ -98,10 +98,10 @@ To host on HDFS, use the Hadoop fs put command: `hadoop fs -put spark-{{site.SPA
 
 
 Or if you are using a custom-compiled version of Spark, you will need to create a package using
-the `make-distribution.sh` script included in a Spark source tarball/checkout.
+the `dev/make-distribution.sh` script included in a Spark source tarball/checkout.
 
 1. Download and build Spark using the instructions [here](index.html)
-2. Create a binary package using `make-distribution.sh --tgz`.
+2. Create a binary package using `./dev/make-distribution.sh --tgz`.
 3. Upload archive to http/s3/hdfs
 
 
diff --git a/pom.xml b/pom.xml
index 85c0131b4e38c3feff779cdc084c164b212e2e14..e7f3442d44f4be9e79c2b8d7f3a9ced2c811b5b8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2246,7 +2246,7 @@
           <failOnWarning>false</failOnWarning>
           <sourceDirectory>${basedir}/src/main/scala</sourceDirectory>
           <testSourceDirectory>${basedir}/src/test/scala</testSourceDirectory>
-          <configLocation>scalastyle-config.xml</configLocation>
+          <configLocation>dev/scalastyle-config.xml</configLocation>
           <outputFile>${basedir}/target/scalastyle-output.xml</outputFile>
           <inputEncoding>${project.build.sourceEncoding}</inputEncoding>
           <outputEncoding>${project.reporting.outputEncoding}</outputEncoding>
@@ -2270,7 +2270,7 @@
           <failOnWarning>false</failOnWarning>
           <sourceDirectory>${basedir}/src/main/java</sourceDirectory>
           <testSourceDirectory>${basedir}/src/test/java</testSourceDirectory>
-          <configLocation>checkstyle.xml</configLocation>
+          <configLocation>dev/checkstyle.xml</configLocation>
           <outputFile>${basedir}/target/checkstyle-output.xml</outputFile>
           <inputEncoding>${project.build.sourceEncoding}</inputEncoding>
           <outputEncoding>${project.reporting.outputEncoding}</outputEncoding>
diff --git a/pylintrc b/python/pylintrc
similarity index 100%
rename from pylintrc
rename to python/pylintrc
diff --git a/sbt/sbt b/sbt/sbt
deleted file mode 100755
index 41438251f681e2e3bc5b6d61aec06589aef389cd..0000000000000000000000000000000000000000
--- a/sbt/sbt
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env bash
-
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-# Determine the current working directory
-_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-
-echo "NOTE: The sbt/sbt script has been relocated to build/sbt." >&2
-echo "      Please update references to point to the new location." >&2
-echo "" >&2
-echo "      Invoking 'build/sbt $@' now ..." >&2
-echo "" >&2
-
-${_DIR}/../build/sbt "$@"