diff --git a/btif/src/bluetooth.c b/btif/src/bluetooth.c
index 1b693b7..f248e08 100644
--- a/btif/src/bluetooth.c
+++ b/btif/src/bluetooth.c
@@ -44,6 +44,7 @@
 #define LOG_TAG "bluedroid"
 
 #include "btif_api.h"
+#include "btsnoop.h"
 #include "bt_utils.h"
 #include "osi.h"
 #include "stack_manager.h"
@@ -385,11 +386,11 @@
 {
     ALOGI("config_hci_snoop_log");
 
-    /* sanity check */
-    if (interface_ready() == FALSE)
+    if (!interface_ready())
         return BT_STATUS_NOT_READY;
 
-    return btif_config_hci_snoop_log(enable);
+    btsnoop_get_interface()->set_api_wants_to_log(enable);
+    return BT_STATUS_SUCCESS;
 }
 
 static int set_os_callouts(bt_os_callouts_t *callouts) {
diff --git a/btif/src/btif_core.c b/btif/src/btif_core.c
index afb21ec..93f24a0 100644
--- a/btif/src/btif_core.c
+++ b/btif/src/btif_core.c
@@ -1331,18 +1331,3 @@
   future_ready(stack_manager_get_hack_future(), FUTURE_SUCCESS);
 }
 
-
-/*******************************************************************************
-**
-** Function         btif_config_hci_snoop_log
-**
-** Description      enable or disable HCI snoop log
-**
-** Returns          bt_status_t
-**
-*******************************************************************************/
-bt_status_t btif_config_hci_snoop_log(uint8_t enable)
-{
-    bte_main_config_hci_logging(enable != 0, !stack_manager_get_interface()->get_stack_is_running());
-    return BT_STATUS_SUCCESS;
-}
diff --git a/hci/Android.mk b/hci/Android.mk
index 190abcc..048652c 100644
--- a/hci/Android.mk
+++ b/hci/Android.mk
@@ -29,6 +29,7 @@
 LOCAL_C_INCLUDES += \
     $(LOCAL_PATH)/include \
     $(LOCAL_PATH)/../include \
+    $(LOCAL_PATH)/../btcore/include \
     $(LOCAL_PATH)/../gki/common \
     $(LOCAL_PATH)/../gki/ulinux \
     $(LOCAL_PATH)/../osi/include \
@@ -48,6 +49,7 @@
 LOCAL_C_INCLUDES := \
     $(LOCAL_PATH)/include \
     $(LOCAL_PATH)/../include \
+    $(LOCAL_PATH)/../btcore/include \
     $(LOCAL_PATH)/../gki/common \
     $(LOCAL_PATH)/../gki/ulinux \
     $(LOCAL_PATH)/../osi/include \
diff --git a/hci/include/btsnoop.h b/hci/include/btsnoop.h
index 05ff791..49df9ee 100644
--- a/hci/include/btsnoop.h
+++ b/hci/include/btsnoop.h
@@ -23,12 +23,10 @@
 #include "bt_types.h"
 
 typedef struct btsnoop_t {
-  // Sets the logging path for btsnoop to the provided |path|.
-  void (*set_logging_path)(const char *path);
-
-  // Turns btsnoop logging on or off, depending on |value|. If
-  // you are turning btsnoop on, you must have set a logging path.
-  void (*set_is_running)(bool value);
+  // Inform btsnoop whether the API desires to log. If |value| is true.
+  // logging will be enabled. Otherwise it defers to the value from the
+  // config file.
+  void (*set_api_wants_to_log)(bool value);
 
   // Capture |packet| and dump it to the btsnoop logs. If |is_received| is
   // true, the packet is marked as incoming. Otherwise, the packet is marked
@@ -36,4 +34,5 @@
   void (*capture)(const BT_HDR *packet, bool is_received);
 } btsnoop_t;
 
+#define BTSNOOP_MODULE "btsnoop_module"
 const btsnoop_t *btsnoop_get_interface();
diff --git a/hci/src/btsnoop.c b/hci/src/btsnoop.c
index c16e26c..703c522 100644
--- a/hci/src/btsnoop.c
+++ b/hci/src/btsnoop.c
@@ -1,6 +1,6 @@
 /******************************************************************************
  *
- *  Copyright (C) 2009-2012 Broadcom Corporation
+ *  Copyright (C) 2014 Google, Inc.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -18,24 +18,21 @@
 
 #define LOG_TAG "btsnoop"
 
-#include <arpa/inet.h>
 #include <assert.h>
-#include <ctype.h>
 #include <cutils/log.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <unistd.h>
 
 #include "btsnoop.h"
 #include "bt_types.h"
-#include "bt_utils.h"
 #include "hci_layer.h"
+#include "stack_config.h"
 
 typedef enum {
   kCommandPacket = 1,
@@ -47,15 +44,121 @@
 // Epoch in microseconds since 01/01/0000.
 static const uint64_t BTSNOOP_EPOCH_DELTA = 0x00dcddb30f2f8000ULL;
 
-// File descriptor for btsnoop file.
-static int hci_btsnoop_fd = -1;
-static bool is_logging = false;
-static const char *logging_path;
+static const stack_config_t *stack_config;
 
+static int logfile_fd = INVALID_FD;
+static bool module_started;
+static bool is_logging;
+static bool logging_enabled_via_api;
+
+// TODO(zachoverflow): merge btsnoop and btsnoop_net together
 void btsnoop_net_open();
 void btsnoop_net_close();
 void btsnoop_net_write(const void *data, size_t length);
 
+static void btsnoop_write_packet(packet_type_t type, const uint8_t *packet, bool is_received);
+static void update_logging();
+
+// Module lifecycle functions
+
+static future_t *start_up(void) {
+  module_started = true;
+  update_logging();
+
+  return NULL;
+}
+
+static future_t *shut_down(void) {
+  module_started = false;
+  update_logging();
+
+  return NULL;
+}
+
+const module_t btsnoop_module = {
+  .name = BTSNOOP_MODULE,
+  .init = NULL,
+  .start_up = start_up,
+  .shut_down = shut_down,
+  .clean_up = NULL,
+  .dependencies = {
+    STACK_CONFIG_MODULE,
+    NULL
+  }
+};
+
+// Interface functions
+
+static void set_api_wants_to_log(bool value) {
+  logging_enabled_via_api = value;
+  update_logging();
+}
+
+static void capture(const BT_HDR *buffer, bool is_received) {
+  const uint8_t *p = buffer->data + buffer->offset;
+
+  if (logfile_fd == INVALID_FD)
+    return;
+
+  switch (buffer->event & MSG_EVT_MASK) {
+    case MSG_HC_TO_STACK_HCI_EVT:
+      btsnoop_write_packet(kEventPacket, p, false);
+      break;
+    case MSG_HC_TO_STACK_HCI_ACL:
+    case MSG_STACK_TO_HC_HCI_ACL:
+      btsnoop_write_packet(kAclPacket, p, is_received);
+      break;
+    case MSG_HC_TO_STACK_HCI_SCO:
+    case MSG_STACK_TO_HC_HCI_SCO:
+      btsnoop_write_packet(kScoPacket, p, is_received);
+      break;
+    case MSG_STACK_TO_HC_HCI_CMD:
+      btsnoop_write_packet(kCommandPacket, p, true);
+      break;
+  }
+}
+
+static const btsnoop_t interface = {
+  set_api_wants_to_log,
+  capture
+};
+
+const btsnoop_t *btsnoop_get_interface() {
+  stack_config = stack_config_get_interface();
+  return &interface;
+}
+
+// Internal functions
+
+static void update_logging() {
+  bool should_log = module_started &&
+    (logging_enabled_via_api || stack_config->get_btsnoop_turned_on());
+
+  if (should_log == is_logging)
+    return;
+
+  is_logging = should_log;
+  if (should_log) {
+    btsnoop_net_open();
+
+    const char *path = stack_config->get_btsnoop_log_path();
+    logfile_fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
+
+    if (logfile_fd == INVALID_FD) {
+      ALOGE("%s unable to open '%s': %s", __func__, path, strerror(errno));
+      return;
+    }
+
+    write(logfile_fd, "btsnoop\0\0\0\0\1\0\0\x3\xea", 16);
+  } else {
+    if (logfile_fd != INVALID_FD)
+      close(logfile_fd);
+
+    logfile_fd = INVALID_FD;
+    btsnoop_net_close();
+  }
+}
+
 static uint64_t btsnoop_timestamp(void) {
   struct timeval tv;
   gettimeofday(&tv, NULL);
@@ -68,8 +171,8 @@
 }
 
 static void btsnoop_write(const void *data, size_t length) {
-  if (hci_btsnoop_fd != -1)
-    write(hci_btsnoop_fd, data, length);
+  if (logfile_fd != INVALID_FD)
+    write(logfile_fd, data, length);
 
   btsnoop_net_write(data, length);
 }
@@ -117,86 +220,3 @@
   btsnoop_write(&type, 1);
   btsnoop_write(packet, length_he - 1);
 }
-
-static void btsnoop_open(const char *p_path) {
-  assert(p_path != NULL);
-  assert(*p_path != '\0');
-
-  btsnoop_net_open();
-
-  if (hci_btsnoop_fd != -1) {
-    ALOGE("%s btsnoop log file is already open.", __func__);
-    return;
-  }
-
-  hci_btsnoop_fd = open(p_path,
-                        O_WRONLY | O_CREAT | O_TRUNC,
-                        S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
-
-  if (hci_btsnoop_fd == -1) {
-    ALOGE("%s unable to open '%s': %s", __func__, p_path, strerror(errno));
-    return;
-  }
-
-  write(hci_btsnoop_fd, "btsnoop\0\0\0\0\1\0\0\x3\xea", 16);
-}
-
-static void btsnoop_close(void) {
-  if (hci_btsnoop_fd != -1)
-    close(hci_btsnoop_fd);
-  hci_btsnoop_fd = -1;
-
-  btsnoop_net_close();
-}
-
-static void btsnoop_set_logging_path(const char *path) {
-  assert(!is_logging);
-  logging_path = path;
-}
-
-static void btsnoop_set_is_running(bool should_log) {
-  if (should_log == is_logging)
-    return;
-
-  is_logging = should_log;
-  if (should_log) {
-    assert(logging_path != NULL);
-    btsnoop_open(logging_path);
-  } else {
-    btsnoop_close();
-  }
-}
-
-static void btsnoop_capture(const BT_HDR *buffer, bool is_received) {
-  const uint8_t *p = buffer->data + buffer->offset;
-
-  if (hci_btsnoop_fd == -1)
-    return;
-
-  switch (buffer->event & MSG_EVT_MASK) {
-    case MSG_HC_TO_STACK_HCI_EVT:
-      btsnoop_write_packet(kEventPacket, p, false);
-      break;
-    case MSG_HC_TO_STACK_HCI_ACL:
-    case MSG_STACK_TO_HC_HCI_ACL:
-      btsnoop_write_packet(kAclPacket, p, is_received);
-      break;
-    case MSG_HC_TO_STACK_HCI_SCO:
-    case MSG_STACK_TO_HC_HCI_SCO:
-      btsnoop_write_packet(kScoPacket, p, is_received);
-      break;
-    case MSG_STACK_TO_HC_HCI_CMD:
-      btsnoop_write_packet(kCommandPacket, p, true);
-      break;
-  }
-}
-
-static const btsnoop_t interface = {
-  btsnoop_set_logging_path,
-  btsnoop_set_is_running,
-  btsnoop_capture
-};
-
-const btsnoop_t *btsnoop_get_interface() {
-  return &interface;
-}
diff --git a/include/bt_trace.h b/include/bt_trace.h
index 0b802fc..d7acce3 100644
--- a/include/bt_trace.h
+++ b/include/bt_trace.h
@@ -18,6 +18,8 @@
 
 #pragma once
 
+#define BTE_LOGMSG_MODULE "bte_logmsg_module"
+
 /* BTE tracing IDs for debug purposes */
 /* LayerIDs for stack */
 #define BTTRC_ID_STK_GKI                   1
@@ -435,5 +437,3 @@
 
 /* External declaration for appl_trace_level here to avoid to add the declaration in all the files using APPL_TRACExxx macros */
 extern UINT8 appl_trace_level;
-
-void BTE_InitTraceLevels(void);
diff --git a/include/stack_config.h b/include/stack_config.h
new file mode 100644
index 0000000..5da6926
--- /dev/null
+++ b/include/stack_config.h
@@ -0,0 +1,34 @@
+/******************************************************************************
+ *
+ *  Copyright (C) 2014 Google, Inc.
+ *
+ *  Licensed 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.
+ *
+ ******************************************************************************/
+
+#pragma once
+
+#include <stdbool.h>
+
+#include "config.h"
+#include "module.h"
+
+typedef struct {
+  const char *(*get_btsnoop_log_path)(void);
+  bool (*get_btsnoop_turned_on)(void);
+  bool (*get_trace_config_enabled)(void);
+  config_t *(*get_all)(void);
+} stack_config_t;
+
+#define STACK_CONFIG_MODULE "stack_config_module"
+const stack_config_t *stack_config_get_interface();
diff --git a/main/Android.mk b/main/Android.mk
index b25d828..da5365c 100644
--- a/main/Android.mk
+++ b/main/Android.mk
@@ -15,7 +15,8 @@
 	bte_main.c \
 	bte_init.c \
 	bte_logmsg.c \
-	bte_conf.c
+	bte_conf.c \
+	stack_config.c
 
 # BTIF
 LOCAL_SRC_FILES += \
diff --git a/main/bte_conf.c b/main/bte_conf.c
index 63ace86..38607f8 100644
--- a/main/bte_conf.c
+++ b/main/bte_conf.c
@@ -26,35 +26,6 @@
 #include "bta_api.h"
 #include "config.h"
 
-// TODO: eliminate these global variables.
-extern char hci_logfile[256];
-extern BOOLEAN hci_logging_enabled;
-extern BOOLEAN hci_save_log;
-extern BOOLEAN trace_conf_enabled;
-void bte_trace_conf_config(const config_t *config);
-
-// Reads the stack configuration file and populates global variables with
-// the contents of the file.
-void bte_load_conf(const char *path) {
-  assert(path != NULL);
-
-  ALOGI("%s attempt to load stack conf from %s", __func__, path);
-
-  config_t *config = config_new(path);
-  if (!config) {
-    ALOGI("%s file >%s< not found", __func__, path);
-    return;
-  }
-
-  strlcpy(hci_logfile, config_get_string(config, CONFIG_DEFAULT_SECTION, "BtSnoopFileName", ""), sizeof(hci_logfile));
-  hci_logging_enabled = config_get_bool(config, CONFIG_DEFAULT_SECTION, "BtSnoopLogOutput", false);
-  hci_save_log = config_get_bool(config, CONFIG_DEFAULT_SECTION, "BtSnoopSaveLog", false);
-  trace_conf_enabled = config_get_bool(config, CONFIG_DEFAULT_SECTION, "TraceConf", false);
-
-  bte_trace_conf_config(config);
-  config_free(config);
-}
-
 #if (defined(BLE_INCLUDED) && (BLE_INCLUDED == TRUE))
 extern int btm_ble_tx_power[BTM_BLE_ADV_TX_POWER_MAX + 1];
 void bte_load_ble_conf(const char* path)
diff --git a/main/bte_logmsg.c b/main/bte_logmsg.c
index 416c5ca..034ede7 100644
--- a/main/bte_logmsg.c
+++ b/main/bte_logmsg.c
@@ -32,6 +32,7 @@
 #include "config.h"
 #include "gki.h"
 #include "l2c_api.h"
+#include "stack_config.h"
 
 #if (RFCOMM_INCLUDED==TRUE)
 #include "port_api.h"
@@ -103,8 +104,6 @@
 
 #define MSG_BUFFER_OFFSET 0
 
-bool trace_conf_enabled = false;
-
 /* LayerIDs for BTA, currently everything maps onto appl_trace_level */
 static const char * const bt_layer_tags[] = {
   "bt-btif",
@@ -231,16 +230,6 @@
 
 static const UINT16 bttrc_map_size = sizeof(bttrc_set_level_map)/sizeof(tBTTRC_FUNC_MAP);
 
-void bte_trace_conf_config(const config_t *config) {
-  assert(config != NULL);
-
-  for (tBTTRC_FUNC_MAP *functions = &bttrc_set_level_map[0]; functions->trc_name; ++functions) {
-    int value = config_get_int(config, CONFIG_DEFAULT_SECTION, functions->trc_name, -1);
-    if (value != -1)
-      functions->trace_level = value;
-  }
-}
-
 void LogMsg(uint32_t trace_set_mask, const char *fmt_str, ...) {
   static char buffer[BTE_LOG_BUF_SIZE];
   int trace_layer = TRACE_GET_LAYER(trace_set_mask);
@@ -272,36 +261,6 @@
   }
 }
 
-/********************************************************************************
- **
- **    Function Name:     BTE_InitTraceLevels
- **
- **    Purpose:           This function can be used to set the boot time reading it from the
- **                       platform.
- **                       WARNING: it is called under BTU context and it blocks the BTU task
- **                       till it returns (sync call)
- **
- **    Input Parameters:  None, platform to provide levels
- **    Returns:
- **                       Newly set levels, if any!
- **
- *********************************************************************************/
-void BTE_InitTraceLevels(void) {
-  //  Read and set trace levels by calling the different XXX_SetTraceLevel().
-  if (trace_conf_enabled == false) {
-    ALOGI("[bttrc] using compile default trace settings");
-    return;
-  }
-
-  tBTTRC_FUNC_MAP *p_f_map = (tBTTRC_FUNC_MAP *)&bttrc_set_level_map[0];
-  while (p_f_map->trc_name != NULL) {
-    ALOGI("BTE_InitTraceLevels -- %s", p_f_map->trc_name);
-    if (p_f_map->p_f)
-      p_f_map->p_f(p_f_map->trace_level);
-    p_f_map++;
-  }
-}
-
 /* this function should go into BTAPP_DM for example */
 static uint8_t BTAPP_SetTraceLevel(uint8_t new_level) {
   if (new_level != 0xFF)
@@ -323,3 +282,40 @@
 
   return btu_cb.trace_level;
 }
+
+static void load_levels_from_config(const config_t *config) {
+  assert(config != NULL);
+
+  for (tBTTRC_FUNC_MAP *functions = &bttrc_set_level_map[0]; functions->trc_name; ++functions) {
+    ALOGI("BTE_InitTraceLevels -- %s", functions->trc_name);
+    int value = config_get_int(config, CONFIG_DEFAULT_SECTION, functions->trc_name, -1);
+    if (value != -1)
+      functions->trace_level = value;
+
+    if (functions->p_f)
+      functions->p_f(functions->trace_level);
+  }
+}
+
+static future_t *init(void) {
+  const stack_config_t *stack_config = stack_config_get_interface();
+  if (!stack_config->get_trace_config_enabled()) {
+    ALOGI("[bttrc] using compile default trace settings");
+    return NULL;
+  }
+
+  load_levels_from_config(stack_config->get_all());
+  return NULL;
+}
+
+const module_t bte_logmsg_module = {
+  .name = BTE_LOGMSG_MODULE,
+  .init = init,
+  .start_up = NULL,
+  .shut_down = NULL,
+  .clean_up = NULL,
+  .dependencies = {
+    STACK_CONFIG_MODULE,
+    NULL
+  }
+};
diff --git a/main/bte_main.c b/main/bte_main.c
index e9edb9e..0c5209a 100755
--- a/main/bte_main.c
+++ b/main/bte_main.c
@@ -48,40 +48,28 @@
 #include "hash_functions.h"
 #include "hash_map.h"
 #include "hci_layer.h"
+#include "module.h"
 #include "osi.h"
+#include "stack_config.h"
 #include "thread.h"
 
 /*******************************************************************************
 **  Constants & Macros
 *******************************************************************************/
 
-/* Run-time configuration file */
-#ifndef BTE_STACK_CONF_FILE
-#define BTE_STACK_CONF_FILE "/etc/bluetooth/bt_stack.conf"
-#endif
 /* Run-time configuration file for BLE*/
 #ifndef BTE_BLE_STACK_CONF_FILE
 #define BTE_BLE_STACK_CONF_FILE "/etc/bluetooth/ble_stack.conf"
 #endif
 
-/* if not specified in .txt file then use this as default  */
-#ifndef HCI_LOGGING_FILENAME
-#define HCI_LOGGING_FILENAME  "/data/misc/bluedroid/btsnoop_hci.log"
-#endif
-
 /******************************************************************************
 **  Variables
 ******************************************************************************/
-BOOLEAN hci_logging_enabled = FALSE;    /* by default, turn hci log off */
-BOOLEAN hci_logging_config = FALSE;    /* configured from bluetooth framework */
-BOOLEAN hci_save_log = FALSE; /* save a copy of the log before starting again */
-char hci_logfile[256] = HCI_LOGGING_FILENAME;
 
 /*******************************************************************************
 **  Static variables
 *******************************************************************************/
 static const hci_t *hci;
-static const btsnoop_t *btsnoop;
 static const hci_callbacks_t hci_callbacks;
 // Lock to serialize shutdown requests from upper layer.
 static pthread_mutex_t shutdown_lock;
@@ -120,8 +108,6 @@
     if (!hci)
       ALOGE("%s could not get hci layer interface.", __func__);
 
-    btsnoop = btsnoop_get_interface();
-
     btu_hci_msg_queue = fixed_queue_new(SIZE_MAX);
     if (btu_hci_msg_queue == NULL) {
       ALOGE("%s unable to allocate hci message queue.", __func__);
@@ -130,10 +116,10 @@
 
     data_dispatcher_register_default(hci->upward_dispatcher, btu_hci_msg_queue);
 
-    bte_load_conf(BTE_STACK_CONF_FILE);
 #if (defined(BLE_INCLUDED) && (BLE_INCLUDED == TRUE))
     bte_load_ble_conf(BTE_BLE_STACK_CONF_FILE);
 #endif
+    module_init(get_module(STACK_CONFIG_MODULE));
 
 #if (BTTRC_INCLUDED == TRUE)
     /* Initialize trace feature */
@@ -141,7 +127,6 @@
 #endif
 
     pthread_mutex_init(&shutdown_lock, NULL);
-    btsnoop->set_logging_path(hci_logfile);
 }
 
 /******************************************************************************
@@ -160,6 +145,8 @@
 
     btu_hci_msg_queue = NULL;
 
+    module_clean_up(get_module(STACK_CONFIG_MODULE));
+
     pthread_mutex_destroy(&shutdown_lock);
     GKI_shutdown();
 }
@@ -180,8 +167,8 @@
 
 //    BTU_StartUp();
 
-    btsnoop->set_is_running(hci_logging_enabled || hci_logging_config);
     assert(hci->start_up_async(btif_local_bd_addr.address, &hci_callbacks));
+    module_start_up(get_module(BTSNOOP_MODULE));
 }
 
 /******************************************************************************
@@ -198,11 +185,11 @@
 {
     APPL_TRACE_DEBUG("%s", __FUNCTION__);
 
+    module_shut_down(get_module(BTSNOOP_MODULE));
     if (hci) {
       // Shutdown is not thread safe and must be protected.
       pthread_mutex_lock(&shutdown_lock);
 
-      btsnoop->set_is_running(false);
       hci->shut_down();
 
       pthread_mutex_unlock(&shutdown_lock);
@@ -213,21 +200,6 @@
 
 /******************************************************************************
 **
-** Function         bte_main_config_hci_logging
-**
-** Description      enable or disable HIC snoop logging
-**
-** Returns          None
-**
-******************************************************************************/
-void bte_main_config_hci_logging(BOOLEAN enable, BOOLEAN bt_disabled)
-{
-  hci_logging_config = enable;
-  btsnoop->set_is_running((hci_logging_config || hci_logging_enabled) && !bt_disabled);
-}
-
-/******************************************************************************
-**
 ** Function         bte_main_postload_cfg
 **
 ** Description      BTE MAIN API - Stack postload configuration
diff --git a/main/stack_config.c b/main/stack_config.c
new file mode 100644
index 0000000..a568c23
--- /dev/null
+++ b/main/stack_config.c
@@ -0,0 +1,93 @@
+/******************************************************************************
+ *
+ *  Copyright (C) 2014 Google, Inc.
+ *
+ *  Licensed 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.
+ *
+ ******************************************************************************/
+
+#define LOG_TAG "bt_stack_config"
+
+#include <assert.h>
+#include <utils/Log.h>
+
+#include "future.h"
+#include "stack_config.h"
+
+const char *BTSNOOP_LOG_PATH_KEY = "BtSnoopFileName";
+const char *BTSNOOP_TURNED_ON_KEY = "BtSnoopLogOutput";
+const char *TRACE_CONFIG_ENABLED_KEY = "TraceConf";
+
+static config_t *config;
+
+// Module lifecycle functions
+
+static future_t *init() {
+  const char *path = "/etc/bluetooth/bt_stack.conf";
+  assert(path != NULL);
+
+  ALOGI("%s attempt to load stack conf from %s", __func__, path);
+
+  config = config_new(path);
+  if (!config) {
+    ALOGI("%s file >%s< not found", __func__, path);
+    return future_new_immediate(FUTURE_FAIL);
+  }
+
+  return future_new_immediate(FUTURE_SUCCESS);
+}
+
+static future_t *clean_up() {
+  config_free(config);
+  return future_new_immediate(FUTURE_SUCCESS);
+}
+
+const module_t stack_config_module = {
+  .name = STACK_CONFIG_MODULE,
+  .init = init,
+  .start_up = NULL,
+  .shut_down = NULL,
+  .clean_up = clean_up,
+  .dependencies = {
+    NULL
+  }
+};
+
+// Interface functions
+
+static const char *get_btsnoop_log_path(void) {
+  return config_get_string(config, CONFIG_DEFAULT_SECTION, BTSNOOP_LOG_PATH_KEY, "/data/misc/bluedroid/btsnoop_hci.log");
+}
+
+static bool get_btsnoop_turned_on(void) {
+  return config_get_bool(config, CONFIG_DEFAULT_SECTION, BTSNOOP_TURNED_ON_KEY, false);
+}
+
+static bool get_trace_config_enabled(void) {
+  return config_get_bool(config, CONFIG_DEFAULT_SECTION, TRACE_CONFIG_ENABLED_KEY, false);
+}
+
+static config_t *get_all(void) {
+  return config;
+}
+
+const stack_config_t interface = {
+  get_btsnoop_log_path,
+  get_btsnoop_turned_on,
+  get_trace_config_enabled,
+  get_all
+};
+
+const stack_config_t *stack_config_get_interface() {
+  return &interface;
+}
diff --git a/stack/Android.mk b/stack/Android.mk
index b0d9c23..616ee07 100644
--- a/stack/Android.mk
+++ b/stack/Android.mk
@@ -17,6 +17,7 @@
                    $(LOCAL_PATH)/sdp \
                    $(LOCAL_PATH)/smp \
                    $(LOCAL_PATH)/srvc \
+                   $(LOCAL_PATH)/../btcore/include \
                    $(LOCAL_PATH)/../vnd/include \
                    $(LOCAL_PATH)/../vnd/ble \
                    $(LOCAL_PATH)/../btif/include \
diff --git a/stack/btu/btu_task.c b/stack/btu/btu_task.c
index d520039..ae0617a 100644
--- a/stack/btu/btu_task.c
+++ b/stack/btu/btu_task.c
@@ -39,10 +39,7 @@
 #include "hash_map.h"
 #include "hcimsgs.h"
 #include "l2c_int.h"
-#include "btu.h"
-#include "bt_utils.h"
-#include <sys/prctl.h>
-
+#include "module.h"
 #include "osi.h"
 #include "sdpint.h"
 #include "thread.h"
@@ -426,7 +423,7 @@
    * reset the control blocks and preset the trace level with XXX_INITIAL_TRACE_LEVEL
    */
 #if ( BT_USE_TRACES==TRUE )
-  BTE_InitTraceLevels();
+  module_init(get_module(BTE_LOGMSG_MODULE));
 #endif
 
   // Inform the bt jni thread initialization is ok.
