diff --git a/networking/udhcp/arpping.c b/networking/udhcp/arpping.c
index 2716a28..471e36d 100644
--- a/networking/udhcp/arpping.c
+++ b/networking/udhcp/arpping.c
@@ -6,18 +6,31 @@
  * by Yoichi Hariguchi <yoichi@fore.com>
  */
 
-#include <time.h>
-#include <sys/socket.h>
 #include <netinet/if_ether.h>
 #include <net/if_arp.h>
-#include <netinet/in.h>
-#include <string.h>
-#include <unistd.h>
-#include <errno.h>
 
-#include "dhcpd.h"
-#include "arpping.h"
 #include "common.h"
+#include "dhcpd.h"
+
+
+struct arpMsg {
+	/* Ethernet header */
+	u_char   h_dest[6];			/* destination ether addr */
+	u_char   h_source[6];			/* source ether addr */
+	u_short  h_proto;			/* packet type ID field */
+
+	/* ARP packet */
+	uint16_t htype;				/* hardware type (must be ARPHRD_ETHER) */
+	uint16_t ptype;				/* protocol type (must be ETH_P_IP) */
+	uint8_t  hlen;				/* hardware address length (must be 6) */
+	uint8_t  plen;				/* protocol address length (must be 4) */
+	uint16_t operation;			/* ARP opcode */
+	uint8_t  sHaddr[6];			/* sender's hardware address */
+	uint8_t  sInaddr[4];			/* sender's IP address */
+	uint8_t  tHaddr[6];			/* target's hardware address */
+	uint8_t  tInaddr[4];			/* target's IP address */
+	uint8_t  pad[18];			/* pad for min. Ethernet payload (60 bytes) */
+} ATTRIBUTE_PACKED;
 
 /* args:	yiaddr - what IP to ping
  *		ip - our ip
diff --git a/networking/udhcp/arpping.h b/networking/udhcp/arpping.h
deleted file mode 100644
index 2990e30..0000000
--- a/networking/udhcp/arpping.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* vi: set sw=4 ts=4: */
-/*
- * arpping .h
- */
-
-#ifndef ARPPING_H
-#define ARPPING_H
-
-#include <netinet/if_ether.h>
-#include <net/if_arp.h>
-#include <net/if.h>
-#include <netinet/in.h>
-
-struct arpMsg {
-	/* Ethernet header */
-	u_char   h_dest[6];			/* destination ether addr */
-	u_char   h_source[6];			/* source ether addr */
-	u_short  h_proto;			/* packet type ID field */
-
-	/* ARP packet */
-	uint16_t htype;				/* hardware type (must be ARPHRD_ETHER) */
-	uint16_t ptype;				/* protocol type (must be ETH_P_IP) */
-	uint8_t  hlen;				/* hardware address length (must be 6) */
-	uint8_t  plen;				/* protocol address length (must be 4) */
-	uint16_t operation;			/* ARP opcode */
-	uint8_t  sHaddr[6];			/* sender's hardware address */
-	uint8_t  sInaddr[4];			/* sender's IP address */
-	uint8_t  tHaddr[6];			/* target's hardware address */
-	uint8_t  tInaddr[4];			/* target's IP address */
-	uint8_t  pad[18];			/* pad for min. Ethernet payload (60 bytes) */
-} ATTRIBUTE_PACKED;
-
-/* function prototypes */
-int arpping(uint32_t yiaddr, uint32_t ip, uint8_t *arp, char *interface);
-
-#endif
diff --git a/networking/udhcp/clientpacket.c b/networking/udhcp/clientpacket.c
index 4299c2d..15cbda2 100644
--- a/networking/udhcp/clientpacket.c
+++ b/networking/udhcp/clientpacket.c
@@ -8,8 +8,6 @@
  * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  */
 
-#include <string.h>
-#include <sys/socket.h>
 #include <features.h>
 #if (__GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1) || defined _NEWLIB_VERSION
 #include <netpacket/packet.h>
@@ -19,19 +17,11 @@
 #include <linux/if_packet.h>
 #include <linux/if_ether.h>
 #endif
-#include <stdlib.h>
-#include <time.h>
-#include <unistd.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <fcntl.h>
 
-
-#include "dhcpd.h"
-#include "clientpacket.h"
-#include "options.h"
-#include "dhcpc.h"
 #include "common.h"
+#include "dhcpd.h"
+#include "dhcpc.h"
+#include "options.h"
 
 
 /* Create a random xid */
@@ -59,7 +49,7 @@
 	udhcp_init_header(packet, type);
 	memcpy(packet->chaddr, client_config.arp, 6);
 	if (client_config.clientid)
-	    add_option_string(packet->options, client_config.clientid);
+		add_option_string(packet->options, client_config.clientid);
 	if (client_config.hostname) add_option_string(packet->options, client_config.hostname);
 	if (client_config.fqdn) add_option_string(packet->options, client_config.fqdn);
 	add_option_string(packet->options, client_config.vendorclass);
@@ -97,7 +87,7 @@
 	add_requests(&packet);
 	bb_info_msg("Sending discover...");
 	return udhcp_raw_packet(&packet, INADDR_ANY, CLIENT_PORT, INADDR_BROADCAST,
-				SERVER_PORT, MAC_BCAST_ADDR, client_config.ifindex);
+			SERVER_PORT, MAC_BCAST_ADDR, client_config.ifindex);
 }
 
 
@@ -188,10 +178,12 @@
 	bytes = ntohs(packet.ip.tot_len);
 
 	/* Make sure its the right packet for us, and that it passes sanity checks */
-	if (packet.ip.protocol != IPPROTO_UDP || packet.ip.version != IPVERSION ||
-	    packet.ip.ihl != sizeof(packet.ip) >> 2 || packet.udp.dest != htons(CLIENT_PORT) ||
-	    bytes > (int) sizeof(struct udp_dhcp_packet) ||
-	    ntohs(packet.udp.len) != (uint16_t) (bytes - sizeof(packet.ip))) {
+	if (packet.ip.protocol != IPPROTO_UDP || packet.ip.version != IPVERSION
+	 || packet.ip.ihl != sizeof(packet.ip) >> 2
+	 || packet.udp.dest != htons(CLIENT_PORT)
+	 || bytes > (int) sizeof(struct udp_dhcp_packet)
+	 || ntohs(packet.udp.len) != (uint16_t)(bytes - sizeof(packet.ip))
+	) {
 		DEBUG("Unrelated/bogus packet");
 		return -2;
 	}
diff --git a/networking/udhcp/clientpacket.h b/networking/udhcp/clientpacket.h
deleted file mode 100644
index b9b9a66..0000000
--- a/networking/udhcp/clientpacket.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/* vi: set sw=4 ts=4: */
-#ifndef _CLIENTPACKET_H
-#define _CLIENTPACKET_H
-
-#include "packet.h"
-
-unsigned long random_xid(void);
-int send_discover(unsigned long xid, unsigned long requested);
-int send_selecting(unsigned long xid, unsigned long server, unsigned long requested);
-int send_renew(unsigned long xid, unsigned long server, unsigned long ciaddr);
-int send_renew(unsigned long xid, unsigned long server, unsigned long ciaddr);
-int send_release(unsigned long server, unsigned long ciaddr);
-int get_raw_packet(struct dhcpMessage *payload, int fd);
-
-#endif
diff --git a/networking/udhcp/clientsocket.c b/networking/udhcp/clientsocket.c
index 6aa6175..8520619 100644
--- a/networking/udhcp/clientsocket.c
+++ b/networking/udhcp/clientsocket.c
@@ -21,10 +21,6 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <unistd.h>
-#include <netinet/in.h>
 #include <features.h>
 #if (__GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1) || defined(_NEWLIB_VERSION)
 #include <netpacket/packet.h>
@@ -35,7 +31,6 @@
 #include <linux/if_ether.h>
 #endif
 
-#include "clientsocket.h"
 #include "common.h"
 
 
@@ -45,7 +40,8 @@
 	struct sockaddr_ll sock;
 
 	DEBUG("Opening raw socket on ifindex %d", ifindex);
-	if ((fd = socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP))) < 0) {
+	fd = socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP));
+	if (fd < 0) {
 		bb_perror_msg("socket");
 		return -1;
 	}
@@ -54,7 +50,7 @@
 	sock.sll_protocol = htons(ETH_P_IP);
 	sock.sll_ifindex = ifindex;
 	if (bind(fd, (struct sockaddr *) &sock, sizeof(sock)) < 0) {
-		bb_perror_msg("bind:");
+		bb_perror_msg("bind");
 		close(fd);
 		return -1;
 	}
diff --git a/networking/udhcp/clientsocket.h b/networking/udhcp/clientsocket.h
deleted file mode 100644
index ea60783..0000000
--- a/networking/udhcp/clientsocket.h
+++ /dev/null
@@ -1,8 +0,0 @@
-/* vi: set sw=4 ts=4: */
-/* clientsocket.h */
-#ifndef _CLIENTSOCKET_H
-#define _CLIENTSOCKET_H
-
-int raw_socket(int ifindex);
-
-#endif
diff --git a/networking/udhcp/common.c b/networking/udhcp/common.c
index a0a21fd..4c18e5d 100644
--- a/networking/udhcp/common.c
+++ b/networking/udhcp/common.c
@@ -10,23 +10,11 @@
  * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  */
 
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <paths.h>
-#include <sys/socket.h>
-#include <stdarg.h>
 #include <syslog.h>
 
 #include "common.h"
-#include "pidfile.h"
 
 
-static int daemonized;
-
 long uptime(void)
 {
 	struct sysinfo info;
@@ -61,7 +49,6 @@
 	pid_fd = pidfile_acquire(pidfile);
 	setsid();
 	xdaemon(0, 0);
-	daemonized++;
 	logmode &= ~LOGMODE_STDIO;
 	pidfile_write_release(pid_fd);
 #endif /* __uClinux__ */
diff --git a/networking/udhcp/common.h b/networking/udhcp/common.h
index d5291f2..70a7693 100644
--- a/networking/udhcp/common.h
+++ b/networking/udhcp/common.h
@@ -10,14 +10,99 @@
 #ifndef _COMMON_H
 #define _COMMON_H
 
-#include "libbb_udhcp.h"
+#include "busybox.h"
+
+#ifdef CONFIG_INSTALL_NO_USR
+# define DEFAULT_SCRIPT  "/share/udhcpc/default.script"
+#else
+# define DEFAULT_SCRIPT  "/usr/share/udhcpc/default.script"
+#endif
+
+#define COMBINED_BINARY
+
+
+/*** packet.h ***/
+
+#include <netinet/udp.h>
+#include <netinet/ip.h>
+
+struct dhcpMessage {
+	uint8_t op;
+	uint8_t htype;
+	uint8_t hlen;
+	uint8_t hops;
+	uint32_t xid;
+	uint16_t secs;
+	uint16_t flags;
+	uint32_t ciaddr;
+	uint32_t yiaddr;
+	uint32_t siaddr;
+	uint32_t giaddr;
+	uint8_t chaddr[16];
+	uint8_t sname[64];
+	uint8_t file[128];
+	uint32_t cookie;
+	uint8_t options[308]; /* 312 - cookie */
+};
+
+struct udp_dhcp_packet {
+	struct iphdr ip;
+	struct udphdr udp;
+	struct dhcpMessage data;
+};
+
+void udhcp_init_header(struct dhcpMessage *packet, char type);
+int udhcp_get_packet(struct dhcpMessage *packet, int fd);
+uint16_t udhcp_checksum(void *addr, int count);
+int udhcp_raw_packet(struct dhcpMessage *payload,
+		uint32_t source_ip, int source_port,
+		uint32_t dest_ip, int dest_port, uint8_t *dest_arp, int ifindex);
+int udhcp_kernel_packet(struct dhcpMessage *payload,
+		uint32_t source_ip, int source_port,
+		uint32_t dest_ip, int dest_port);
+
+
+/**/
+
+void udhcp_background(const char *pidfile);
+void udhcp_start_log_and_pid(const char *pidfile);
+
+void udhcp_run_script(struct dhcpMessage *packet, const char *name);
+
+// Still need to clean these up...
+
+/* from pidfile.h */
+#define pidfile_acquire		udhcp_pidfile_acquire
+#define pidfile_write_release	udhcp_pidfile_write_release
+/* from options.h */
+#define get_option		udhcp_get_option
+#define end_option		udhcp_end_option
+#define add_option_string	udhcp_add_option_string
+#define add_simple_option	udhcp_add_simple_option
+#define option_lengths		udhcp_option_lengths
+/* from socket.h */
+#define listen_socket		udhcp_listen_socket
+#define read_interface		udhcp_read_interface
+/* from dhcpc.h */
+#define client_config		udhcp_client_config
+/* from dhcpd.h */
+#define server_config		udhcp_server_config
 
 long uptime(void);
+void udhcp_sp_setup(void);
+int udhcp_sp_fd_set(fd_set *rfds, int extra_fd);
+int udhcp_sp_read(fd_set *rfds);
+int raw_socket(int ifindex);
+int read_interface(char *interface, int *ifindex, uint32_t *addr, uint8_t *arp);
+int listen_socket(uint32_t ip, int port, char *inf);
+int pidfile_acquire(const char *pidfile);
+void pidfile_write_release(int pid_fd);
+int arpping(uint32_t yiaddr, uint32_t ip, uint8_t *arp, char *interface);
 
 #if ENABLE_FEATURE_UDHCP_DEBUG
 # define DEBUG(str, args...) bb_info_msg(str, ## args)
 #else
-# define DEBUG(str, args...) do {;} while(0)
+# define DEBUG(str, args...) do {;} while (0)
 #endif
 
 #endif
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index e2ddf4f..4ccd8ec 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -8,28 +8,13 @@
  * Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
  */
 
-#include <sys/file.h>
-#include <unistd.h>
 #include <getopt.h>
-#include <stdlib.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <signal.h>
-#include <time.h>
-#include <string.h>
-#include <sys/ioctl.h>
-#include <net/if.h>
-#include <errno.h>
 
 #include "common.h"
 #include "dhcpd.h"
 #include "dhcpc.h"
 #include "options.h"
-#include "clientpacket.h"
-#include "clientsocket.h"
-#include "socket.h"
-#include "signalpipe.h"
+
 
 static int state;
 /* Something is definitely wrong here. IPv4 addresses
diff --git a/networking/udhcp/dhcpc.h b/networking/udhcp/dhcpc.h
index 6cf59a9..d5c8a4b 100644
--- a/networking/udhcp/dhcpc.h
+++ b/networking/udhcp/dhcpc.h
@@ -3,9 +3,6 @@
 #ifndef _DHCPC_H
 #define _DHCPC_H
 
-/* grab define DEFAULT_SCRIPT */
-#include "libbb_udhcp.h"
-
 #define INIT_SELECTING	0
 #define REQUESTING	1
 #define BOUND		2
@@ -15,7 +12,6 @@
 #define RENEW_REQUESTED 6
 #define RELEASED	7
 
-
 struct client_config_t {
 	char foreground;		/* Do not fork */
 	char quit_after_lease;		/* Quit after obtaining lease */
@@ -38,4 +34,15 @@
 extern struct client_config_t client_config;
 
 
+/*** clientpacket.h ***/
+
+unsigned long random_xid(void);
+int send_discover(unsigned long xid, unsigned long requested);
+int send_selecting(unsigned long xid, unsigned long server, unsigned long requested);
+int send_renew(unsigned long xid, unsigned long server, unsigned long ciaddr);
+int send_renew(unsigned long xid, unsigned long server, unsigned long ciaddr);
+int send_release(unsigned long server, unsigned long ciaddr);
+int get_raw_packet(struct dhcpMessage *payload, int fd);
+
+
 #endif
diff --git a/networking/udhcp/dhcpd.c b/networking/udhcp/dhcpd.c
index 62057be..0935a94 100644
--- a/networking/udhcp/dhcpd.c
+++ b/networking/udhcp/dhcpd.c
@@ -10,29 +10,9 @@
  * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  */
 
-#include <fcntl.h>
-#include <string.h>
-#include <stdlib.h>
-#include <sys/wait.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <netinet/in.h>
-#include <sys/socket.h>
-#include <unistd.h>
-#include <signal.h>
-#include <errno.h>
-#include <sys/ioctl.h>
-#include <time.h>
-
-#include "dhcpd.h"
-#include "arpping.h"
-#include "socket.h"
-#include "options.h"
-#include "files.h"
-#include "serverpacket.h"
 #include "common.h"
-#include "signalpipe.h"
-#include "static_leases.h"
+#include "dhcpd.h"
+#include "options.h"
 
 
 /* globals */
@@ -86,7 +66,7 @@
 	udhcp_sp_setup();
 
 	timeout_end = time(0) + server_config.auto_time;
-	while(1) { /* loop until universe collapses */
+	while (1) { /* loop until universe collapses */
 
 		if (server_socket < 0)
 			if ((server_socket = listen_socket(INADDR_ANY, SERVER_PORT, server_config.interface)) < 0) {
@@ -144,8 +124,7 @@
 		/* Look for a static lease */
 		static_lease_ip = getIpByMac(server_config.static_leases, &packet.chaddr);
 
-		if(static_lease_ip)
-		{
+		if (static_lease_ip) {
 			bb_info_msg("Found static lease: %x", static_lease_ip);
 
 			memcpy(&static_lease.chaddr, &packet.chaddr, 16);
@@ -154,10 +133,8 @@
 
 			lease = &static_lease;
 
-		}
-		else
-		{
-		lease = find_lease_by_chaddr(packet.chaddr);
+		} else {
+			lease = find_lease_by_chaddr(packet.chaddr);
 		}
 
 		switch (state[0]) {
@@ -245,4 +222,3 @@
 
 	return 0;
 }
-
diff --git a/networking/udhcp/dhcpd.h b/networking/udhcp/dhcpd.h
index dc8f3c4..40959e4 100644
--- a/networking/udhcp/dhcpd.h
+++ b/networking/udhcp/dhcpd.h
@@ -3,12 +3,6 @@
 #ifndef _DHCPD_H
 #define _DHCPD_H
 
-#include <netinet/ip.h>
-#include <netinet/udp.h>
-
-#include "libbb_udhcp.h"
-#include "leases.h"
-
 /************************************/
 /* Defaults _you_ may want to tweak */
 /************************************/
@@ -138,4 +132,59 @@
 extern struct dhcpOfferedAddr *leases;
 
 
+/*** leases.h ***/
+
+struct dhcpOfferedAddr {
+	uint8_t chaddr[16];
+	uint32_t yiaddr;	/* network order */
+	uint32_t expires;	/* host order */
+};
+
+extern uint8_t blank_chaddr[];
+
+void clear_lease(uint8_t *chaddr, uint32_t yiaddr);
+struct dhcpOfferedAddr *add_lease(uint8_t *chaddr, uint32_t yiaddr, unsigned long lease);
+int lease_expired(struct dhcpOfferedAddr *lease);
+struct dhcpOfferedAddr *oldest_expired_lease(void);
+struct dhcpOfferedAddr *find_lease_by_chaddr(uint8_t *chaddr);
+struct dhcpOfferedAddr *find_lease_by_yiaddr(uint32_t yiaddr);
+uint32_t find_address(int check_expired);
+
+
+/*** static_leases.h ***/
+
+/* Config file will pass static lease info to this function which will add it
+ * to a data structure that can be searched later */
+int addStaticLease(struct static_lease **lease_struct, uint8_t *mac, uint32_t *ip);
+/* Check to see if a mac has an associated static lease */
+uint32_t getIpByMac(struct static_lease *lease_struct, void *arg);
+/* Check to see if an ip is reserved as a static ip */
+uint32_t reservedIp(struct static_lease *lease_struct, uint32_t ip);
+/* Print out static leases just to check what's going on (debug code) */
+void printStaticLeases(struct static_lease **lease_struct);
+
+
+/*** serverpacket.h ***/
+
+int sendOffer(struct dhcpMessage *oldpacket);
+int sendNAK(struct dhcpMessage *oldpacket);
+int sendACK(struct dhcpMessage *oldpacket, uint32_t yiaddr);
+int send_inform(struct dhcpMessage *oldpacket);
+
+
+/*** files.h ***/
+
+struct config_keyword {
+	const char *keyword;
+	int (* const handler)(const char *line, void *var);
+	void *var;
+	const char *def;
+};
+
+int read_config(const char *file);
+void write_leases(void);
+void read_leases(const char *file);
+struct option_set *find_option(struct option_set *opt_list, char code);
+
+
 #endif
diff --git a/networking/udhcp/dumpleases.c b/networking/udhcp/dumpleases.c
index 60e6b7e..4422d30 100644
--- a/networking/udhcp/dumpleases.c
+++ b/networking/udhcp/dumpleases.c
@@ -2,23 +2,11 @@
 /*
  * Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
  */
-#include <fcntl.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <sys/wait.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <netinet/in.h>
-#include <stdio.h>
-#include <sys/socket.h>
-#include <unistd.h>
 #include <getopt.h>
-#include <time.h>
 
+#include "common.h"
 #include "dhcpd.h"
-#include "leases.h"
-#include "libbb_udhcp.h"
+
 
 #define REMAINING 0
 #define ABSOLUTE 1
@@ -60,17 +48,16 @@
 	printf("Mac Address       IP-Address      Expires %s\n", mode == REMAINING ? "in" : "at");
 	/*     "00:00:00:00:00:00 255.255.255.255 Wed Jun 30 21:49:08 1993" */
 	while (fread(&lease, sizeof(lease), 1, fp)) {
-
-		for (i = 0; i < 6; i++) {
-			printf("%02x", lease.chaddr[i]);
-			if (i != 5) printf(":");
+		printf(":%02x"+1, lease.chaddr[0]);
+		for (i = 1; i < 6; i++) {
+			printf(":%02x", lease.chaddr[i]);
 		}
 		addr.s_addr = lease.yiaddr;
-		printf(" %-15s", inet_ntoa(addr));
+		printf(" %-15s ", inet_ntoa(addr));
 		expires = ntohl(lease.expires);
-		printf(" ");
 		if (mode == REMAINING) {
-			if (!expires) printf("expired\n");
+			if (!expires)
+				printf("expired\n");
 			else {
 				if (expires > 60*60*24) {
 					printf("%ld days, ", expires / (60*60*24));
diff --git a/networking/udhcp/files.c b/networking/udhcp/files.c
index 36bcc31..317e861 100644
--- a/networking/udhcp/files.c
+++ b/networking/udhcp/files.c
@@ -4,21 +4,12 @@
  * Rewrite by Russ Dill <Russ.Dill@asu.edu> July 2001
  */
 
-#include <sys/socket.h>
-#include <arpa/inet.h>
-#include <string.h>
-#include <stdlib.h>
-#include <time.h>
-#include <ctype.h>
-#include <netdb.h>
-
 #include <netinet/ether.h>
-#include "static_leases.h"
 
+#include "common.h"
 #include "dhcpd.h"
 #include "options.h"
-#include "files.h"
-#include "common.h"
+
 
 /*
  * Domain names may have 254 chars, and string options can be 254
@@ -51,7 +42,7 @@
 
 	temp_ether_addr = ether_aton(line);
 
-	if(temp_ether_addr == NULL)
+	if (temp_ether_addr == NULL)
 		retval = 0;
 	else
 		memcpy(mac_bytes, temp_ether_addr, 6);
@@ -217,7 +208,6 @@
 
 static int read_staticlease(const char *const_line, void *arg)
 {
-
 	char *line;
 	char *mac_string;
 	char *ip_string;
@@ -243,7 +233,6 @@
 	if (ENABLE_FEATURE_UDHCP_DEBUG) printStaticLeases(arg);
 
 	return 1;
-
 }
 
 
@@ -308,9 +297,9 @@
 		for (i = 0; keywords[i].keyword[0]; i++)
 			if (!strcasecmp(token, keywords[i].keyword))
 				if (!keywords[i].handler(line, keywords[i].var)) {
-					bb_error_msg("failure parsing line %d of %s", lm, file);
+					bb_error_msg("cannot parse line %d of %s", lm, file);
 					if (ENABLE_FEATURE_UDHCP_DEBUG)
-						bb_error_msg("unable to parse '%s'", debug_orig);
+						bb_error_msg("cannot parse '%s'", debug_orig);
 					/* reset back to the default value */
 					keywords[i].handler(keywords[i].def, keywords[i].var);
 				}
diff --git a/networking/udhcp/files.h b/networking/udhcp/files.h
deleted file mode 100644
index 8846931..0000000
--- a/networking/udhcp/files.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* vi: set sw=4 ts=4: */
-/* files.h */
-#ifndef _FILES_H
-#define _FILES_H
-
-struct config_keyword {
-	const char *keyword;
-	int (* const handler)(const char *line, void *var);
-	void *var;
-	const char *def;
-};
-
-
-int read_config(const char *file);
-void write_leases(void);
-void read_leases(const char *file);
-
-struct option_set *find_option(struct option_set *opt_list, char code);
-
-#endif
diff --git a/networking/udhcp/leases.c b/networking/udhcp/leases.c
index f511340..2f7847d 100644
--- a/networking/udhcp/leases.c
+++ b/networking/udhcp/leases.c
@@ -4,20 +4,8 @@
  * Russ Dill <Russ.Dill@asu.edu> July 2001
  */
 
-#include <time.h>
-#include <string.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include "dhcpd.h"
-#include "files.h"
-#include "options.h"
-#include "leases.h"
-#include "arpping.h"
 #include "common.h"
-
-#include "static_leases.h"
+#include "dhcpd.h"
 
 
 uint8_t blank_chaddr[] = {[0 ... 15] = 0};
@@ -138,22 +126,20 @@
 		if ((addr & 0xFF) == 0xFF) continue;
 
 		/* Only do if it isn't an assigned as a static lease */
-		if(!reservedIp(server_config.static_leases, htonl(addr)))
-		{
+		if (!reservedIp(server_config.static_leases, htonl(addr))) {
 
-		/* lease is not taken */
-		ret = htonl(addr);
-		if ((!(lease = find_lease_by_yiaddr(ret)) ||
+			/* lease is not taken */
+			ret = htonl(addr);
+			lease = find_lease_by_yiaddr(ret);
 
-		     /* or it expired and we are checking for expired leases */
-		     (check_expired  && lease_expired(lease))) &&
-
-		     /* and it isn't on the network */
-		     !check_ip(ret)) {
-			return ret;
-			break;
+			/* no lease or it expired and we are checking for expired leases */
+			if ( (!lease || (check_expired && lease_expired(lease)))
+			 && /* and it isn't on the network */ !check_ip(ret)
+			) {
+				return ret;
+				break;
+			}
 		}
 	}
-	}
 	return 0;
 }
diff --git a/networking/udhcp/leases.h b/networking/udhcp/leases.h
deleted file mode 100644
index 8dba65e..0000000
--- a/networking/udhcp/leases.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* vi: set sw=4 ts=4: */
-/* leases.h */
-#ifndef _LEASES_H
-#define _LEASES_H
-
-
-struct dhcpOfferedAddr {
-	uint8_t chaddr[16];
-	uint32_t yiaddr;	/* network order */
-	uint32_t expires;	/* host order */
-};
-
-extern uint8_t blank_chaddr[];
-
-void clear_lease(uint8_t *chaddr, uint32_t yiaddr);
-struct dhcpOfferedAddr *add_lease(uint8_t *chaddr, uint32_t yiaddr, unsigned long lease);
-int lease_expired(struct dhcpOfferedAddr *lease);
-struct dhcpOfferedAddr *oldest_expired_lease(void);
-struct dhcpOfferedAddr *find_lease_by_chaddr(uint8_t *chaddr);
-struct dhcpOfferedAddr *find_lease_by_yiaddr(uint32_t yiaddr);
-uint32_t find_address(int check_expired);
-
-
-#endif
diff --git a/networking/udhcp/libbb_udhcp.h b/networking/udhcp/libbb_udhcp.h
deleted file mode 100644
index ab4ad06..0000000
--- a/networking/udhcp/libbb_udhcp.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* vi: set sw=4 ts=4: */
-/* libbb_udhcp.h - busybox compatibility wrapper */
-
-/* bit of a hack, do this no matter what the order of the includes.
- * (for busybox) */
-
-#ifndef _LIBBB_UDHCP_H
-#define _LIBBB_UDHCP_H
-
-#include "packet.h"
-#include "busybox.h"
-
-#ifdef CONFIG_INSTALL_NO_USR
-# define DEFAULT_SCRIPT  "/share/udhcpc/default.script"
-#else
-# define DEFAULT_SCRIPT  "/usr/share/udhcpc/default.script"
-#endif
-
-
-
-#define COMBINED_BINARY
-
-void udhcp_background(const char *pidfile);
-void udhcp_start_log_and_pid(const char *pidfile);
-
-void udhcp_run_script(struct dhcpMessage *packet, const char *name);
-
-// Still need to clean these up...
-
-/* from pidfile.h */
-#define pidfile_acquire		udhcp_pidfile_acquire
-#define pidfile_write_release	udhcp_pidfile_write_release
-/* from options.h */
-#define get_option		udhcp_get_option
-#define end_option		udhcp_end_option
-#define add_option_string	udhcp_add_option_string
-#define add_simple_option	udhcp_add_simple_option
-#define option_lengths		udhcp_option_lengths
-/* from socket.h */
-#define listen_socket		udhcp_listen_socket
-#define read_interface		udhcp_read_interface
-/* from dhcpc.h */
-#define client_config		udhcp_client_config
-/* from dhcpd.h */
-#define server_config		udhcp_server_config
-
-#endif /* _LIBBB_UDHCP_H */
diff --git a/networking/udhcp/options.c b/networking/udhcp/options.c
index 5cc08cc..9fcbc84 100644
--- a/networking/udhcp/options.c
+++ b/networking/udhcp/options.c
@@ -4,13 +4,9 @@
  * Rewrite by Russ Dill <Russ.Dill@asu.edu> July 2001
  */
 
-#include <stdlib.h>
-#include <string.h>
-
 #include "common.h"
 #include "dhcpd.h"
 #include "options.h"
-#include "files.h"
 
 
 /* supported options are easily added here */
diff --git a/networking/udhcp/options.h b/networking/udhcp/options.h
index 3c1f5b9..1b179f1 100644
--- a/networking/udhcp/options.h
+++ b/networking/udhcp/options.h
@@ -3,8 +3,6 @@
 #ifndef _OPTIONS_H
 #define _OPTIONS_H
 
-#include "packet.h"
-
 #define TYPE_MASK	0x0F
 
 enum {
diff --git a/networking/udhcp/packet.c b/networking/udhcp/packet.c
index e861b82..e79542d 100644
--- a/networking/udhcp/packet.c
+++ b/networking/udhcp/packet.c
@@ -1,10 +1,6 @@
 /* vi: set sw=4 ts=4: */
-#include <unistd.h>
-#include <string.h>
+
 #include <netinet/in.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <features.h>
 #if (__GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1) || defined _NEWLIB_VERSION
 #include <netpacket/packet.h>
 #include <net/ethernet.h>
@@ -13,10 +9,8 @@
 #include <linux/if_packet.h>
 #include <linux/if_ether.h>
 #endif
-#include <errno.h>
 
 #include "common.h"
-#include "packet.h"
 #include "dhcpd.h"
 #include "options.h"
 
@@ -70,8 +64,9 @@
 
 	if (packet->op == BOOTREQUEST && (vendor = get_option(packet, DHCP_VENDOR))) {
 		for (i = 0; broken_vendors[i][0]; i++) {
-			if (vendor[OPT_LEN - 2] == (uint8_t) strlen(broken_vendors[i]) &&
-			    !strncmp((char*)vendor, broken_vendors[i], vendor[OPT_LEN - 2])) {
+			if (vendor[OPT_LEN - 2] == (uint8_t)strlen(broken_vendors[i])
+			 && !strncmp((char*)vendor, broken_vendors[i], vendor[OPT_LEN - 2])
+			) {
 				DEBUG("broken client (%s), forcing broadcast",
 					broken_vendors[i]);
 				packet->flags |= htons(BROADCAST_FLAG);
@@ -114,15 +109,17 @@
 
 
 /* Construct a ip/udp header for a packet, and specify the source and dest hardware address */
-int udhcp_raw_packet(struct dhcpMessage *payload, uint32_t source_ip, int source_port,
-		   uint32_t dest_ip, int dest_port, uint8_t *dest_arp, int ifindex)
+int udhcp_raw_packet(struct dhcpMessage *payload,
+		uint32_t source_ip, int source_port,
+		uint32_t dest_ip, int dest_port, uint8_t *dest_arp, int ifindex)
 {
 	int fd;
 	int result;
 	struct sockaddr_ll dest;
 	struct udp_dhcp_packet packet;
 
-	if ((fd = socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP))) < 0) {
+	fd = socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP));
+	if (fd < 0) {
 		bb_perror_msg("socket");
 		return -1;
 	}
@@ -157,7 +154,8 @@
 	packet.ip.ttl = IPDEFTTL;
 	packet.ip.check = udhcp_checksum(&(packet.ip), sizeof(packet.ip));
 
-	result = sendto(fd, &packet, sizeof(struct udp_dhcp_packet), 0, (struct sockaddr *) &dest, sizeof(dest));
+	result = sendto(fd, &packet, sizeof(struct udp_dhcp_packet), 0,
+			(struct sockaddr *) &dest, sizeof(dest));
 	if (result <= 0) {
 		bb_perror_msg("sendto");
 	}
@@ -167,14 +165,16 @@
 
 
 /* Let the kernel do all the work for packet generation */
-int udhcp_kernel_packet(struct dhcpMessage *payload, uint32_t source_ip, int source_port,
-		   uint32_t dest_ip, int dest_port)
+int udhcp_kernel_packet(struct dhcpMessage *payload,
+		uint32_t source_ip, int source_port,
+		uint32_t dest_ip, int dest_port)
 {
 	int n = 1;
 	int fd, result;
 	struct sockaddr_in client;
 
-	if ((fd = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0)
+	fd = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
+	if (fd < 0)
 		return -1;
 
 	if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char *) &n, sizeof(n)) == -1) {
diff --git a/networking/udhcp/packet.h b/networking/udhcp/packet.h
deleted file mode 100644
index 0257a2c..0000000
--- a/networking/udhcp/packet.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* vi: set sw=4 ts=4: */
-#ifndef _PACKET_H
-#define _PACKET_H
-
-#include <netinet/udp.h>
-#include <netinet/ip.h>
-
-struct dhcpMessage {
-	uint8_t op;
-	uint8_t htype;
-	uint8_t hlen;
-	uint8_t hops;
-	uint32_t xid;
-	uint16_t secs;
-	uint16_t flags;
-	uint32_t ciaddr;
-	uint32_t yiaddr;
-	uint32_t siaddr;
-	uint32_t giaddr;
-	uint8_t chaddr[16];
-	uint8_t sname[64];
-	uint8_t file[128];
-	uint32_t cookie;
-	uint8_t options[308]; /* 312 - cookie */
-};
-
-struct udp_dhcp_packet {
-	struct iphdr ip;
-	struct udphdr udp;
-	struct dhcpMessage data;
-};
-
-void udhcp_init_header(struct dhcpMessage *packet, char type);
-int udhcp_get_packet(struct dhcpMessage *packet, int fd);
-uint16_t udhcp_checksum(void *addr, int count);
-int udhcp_raw_packet(struct dhcpMessage *payload, uint32_t source_ip, int source_port,
-		   uint32_t dest_ip, int dest_port, uint8_t *dest_arp, int ifindex);
-int udhcp_kernel_packet(struct dhcpMessage *payload, uint32_t source_ip, int source_port,
-		   uint32_t dest_ip, int dest_port);
-
-
-#endif
diff --git a/networking/udhcp/pidfile.c b/networking/udhcp/pidfile.c
index 6673c95..8d00490 100644
--- a/networking/udhcp/pidfile.c
+++ b/networking/udhcp/pidfile.c
@@ -20,15 +20,8 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <stdlib.h>
-
 #include "common.h"
-#include "pidfile.h"
+
 
 static char *saved_pidfile;
 
diff --git a/networking/udhcp/pidfile.h b/networking/udhcp/pidfile.h
deleted file mode 100644
index 38c8493..0000000
--- a/networking/udhcp/pidfile.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* vi: set sw=4 ts=4: */
-/* pidfile.h
- *
- * Functions to assist in the writing and removing of pidfiles.
- *
- * Russ Dill <Russ.Dill@asu.edu> September 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-
-int pidfile_acquire(const char *pidfile);
-void pidfile_write_release(int pid_fd);
-
diff --git a/networking/udhcp/script.c b/networking/udhcp/script.c
index 3c4b51b..6e0ca88 100644
--- a/networking/udhcp/script.c
+++ b/networking/udhcp/script.c
@@ -8,20 +8,11 @@
  * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  */
 
-#include <string.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-
 #include "common.h"
-#include "options.h"
 #include "dhcpd.h"
 #include "dhcpc.h"
+#include "options.h"
+
 
 /* get a rough idea of how long an option will be (rounding up...) */
 static const int max_option_length[] = {
@@ -76,7 +67,7 @@
 
 	type = type_p->flags & TYPE_MASK;
 	optlen = option_lengths[type];
-	for(;;) {
+	for (;;) {
 		switch (type) {
 		case OPTION_IP_PAIR:
 			dest += sprintip(dest, "", option);
diff --git a/networking/udhcp/serverpacket.c b/networking/udhcp/serverpacket.c
index b5cfcf4..8889fda 100644
--- a/networking/udhcp/serverpacket.c
+++ b/networking/udhcp/serverpacket.c
@@ -20,17 +20,10 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <string.h>
-#include <time.h>
-
 #include "common.h"
-#include "serverpacket.h"
 #include "dhcpd.h"
 #include "options.h"
-#include "static_leases.h"
+
 
 /* send a packet to giaddr using the kernel ip stack */
 static int send_packet_to_relay(struct dhcpMessage *payload)
@@ -122,65 +115,57 @@
 	static_lease_ip = getIpByMac(server_config.static_leases, oldpacket->chaddr);
 
 	/* ADDME: if static, short circuit */
-	if(!static_lease_ip)
-	{
-	/* the client is in our lease/offered table */
-	if ((lease = find_lease_by_chaddr(oldpacket->chaddr))) {
-		if (!lease_expired(lease))
-			lease_time_align = lease->expires - time(0);
-		packet.yiaddr = lease->yiaddr;
+	if (!static_lease_ip) {
+		/* the client is in our lease/offered table */
+		lease = find_lease_by_chaddr(oldpacket->chaddr);
+		if (lease) {
+			if (!lease_expired(lease))
+				lease_time_align = lease->expires - time(0);
+			packet.yiaddr = lease->yiaddr;
 
-	/* Or the client has a requested ip */
-	} else if ((req = get_option(oldpacket, DHCP_REQUESTED_IP)) &&
-
-		   /* Don't look here (ugly hackish thing to do) */
-		   memcpy(&req_align, req, 4) &&
-
-		   /* and the ip is in the lease range */
-		   ntohl(req_align) >= ntohl(server_config.start) &&
-		   ntohl(req_align) <= ntohl(server_config.end) &&
-
-			!static_lease_ip &&  /* Check that its not a static lease */
+		/* Or the client has a requested ip */
+		} else if ((req = get_option(oldpacket, DHCP_REQUESTED_IP))
+			/* Don't look here (ugly hackish thing to do) */
+			&& memcpy(&req_align, req, 4)
+			/* and the ip is in the lease range */
+			&& ntohl(req_align) >= ntohl(server_config.start)
+			&& ntohl(req_align) <= ntohl(server_config.end)
+			&& !static_lease_ip /* Check that its not a static lease */
 			/* and is not already taken/offered */
-		   ((!(lease = find_lease_by_yiaddr(req_align)) ||
-
-		   /* or its taken, but expired */ /* ADDME: or maybe in here */
-		   lease_expired(lease)))) {
-				packet.yiaddr = req_align; /* FIXME: oh my, is there a host using this IP? */
-
+			&& (!(lease = find_lease_by_yiaddr(req_align))
+				/* or its taken, but expired */ /* ADDME: or maybe in here */
+				|| lease_expired(lease))
+		) {
+			packet.yiaddr = req_align; /* FIXME: oh my, is there a host using this IP? */
 			/* otherwise, find a free IP */
-	} else {
+		} else {
 			/* Is it a static lease? (No, because find_address skips static lease) */
-		packet.yiaddr = find_address(0);
+			packet.yiaddr = find_address(0);
+			/* try for an expired lease */
+			if (!packet.yiaddr) packet.yiaddr = find_address(1);
+		}
 
-		/* try for an expired lease */
-		if (!packet.yiaddr) packet.yiaddr = find_address(1);
-	}
+		if (!packet.yiaddr) {
+			bb_error_msg("no IP addresses to give - OFFER abandoned");
+			return -1;
+		}
+		if (!add_lease(packet.chaddr, packet.yiaddr, server_config.offer_time)) {
+			bb_error_msg("lease pool is full - OFFER abandoned");
+			return -1;
+		}
+		lease_time = get_option(oldpacket, DHCP_LEASE_TIME);
+		if (lease_time) {
+			memcpy(&lease_time_align, lease_time, 4);
+			lease_time_align = ntohl(lease_time_align);
+			if (lease_time_align > server_config.lease)
+				lease_time_align = server_config.lease;
+		}
 
-	if(!packet.yiaddr) {
-		bb_error_msg("no IP addresses to give - OFFER abandoned");
-		return -1;
-	}
-
-	if (!add_lease(packet.chaddr, packet.yiaddr, server_config.offer_time)) {
-		bb_error_msg("lease pool is full - OFFER abandoned");
-		return -1;
-	}
-
-	if ((lease_time = get_option(oldpacket, DHCP_LEASE_TIME))) {
-		memcpy(&lease_time_align, lease_time, 4);
-		lease_time_align = ntohl(lease_time_align);
-		if (lease_time_align > server_config.lease)
+		/* Make sure we aren't just using the lease time from the previous offer */
+		if (lease_time_align < server_config.min_lease)
 			lease_time_align = server_config.lease;
-	}
-
-	/* Make sure we aren't just using the lease time from the previous offer */
-	if (lease_time_align < server_config.min_lease)
-		lease_time_align = server_config.lease;
-	}
-	/* ADDME: end of short circuit */
-	else
-	{
+		/* ADDME: end of short circuit */
+	} else {
 		/* It is a static lease... use it */
 		packet.yiaddr = static_lease_ip;
 	}
diff --git a/networking/udhcp/serverpacket.h b/networking/udhcp/serverpacket.h
deleted file mode 100644
index 20e1d5d..0000000
--- a/networking/udhcp/serverpacket.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/* vi: set sw=4 ts=4: */
-#ifndef _SERVERPACKET_H
-#define _SERVERPACKET_H
-
-#include "packet.h"
-
-int sendOffer(struct dhcpMessage *oldpacket);
-int sendNAK(struct dhcpMessage *oldpacket);
-int sendACK(struct dhcpMessage *oldpacket, uint32_t yiaddr);
-int send_inform(struct dhcpMessage *oldpacket);
-
-
-#endif
diff --git a/networking/udhcp/signalpipe.c b/networking/udhcp/signalpipe.c
index bece419..3615965 100644
--- a/networking/udhcp/signalpipe.c
+++ b/networking/udhcp/signalpipe.c
@@ -20,17 +20,9 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#include <unistd.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/select.h>
-
-
-#include "signalpipe.h"
 #include "common.h"
 
+
 static int signal_pipe[2];
 
 static void signal_handler(int sig)
diff --git a/networking/udhcp/signalpipe.h b/networking/udhcp/signalpipe.h
deleted file mode 100644
index 1621d57..0000000
--- a/networking/udhcp/signalpipe.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* vi: set sw=4 ts=4: */
-/* signalpipe.h
- *
- * Russ Dill <Russ.Dill@asu.edu> December 2003
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-void udhcp_sp_setup(void);
-int udhcp_sp_fd_set(fd_set *rfds, int extra_fd);
-int udhcp_sp_read(fd_set *rfds);
diff --git a/networking/udhcp/socket.c b/networking/udhcp/socket.c
index d1867e9..ea29131 100644
--- a/networking/udhcp/socket.c
+++ b/networking/udhcp/socket.c
@@ -23,15 +23,7 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <netinet/in.h>
-#include <unistd.h>
-#include <string.h>
-#include <arpa/inet.h>
 #include <net/if.h>
-#include <errno.h>
 #include <features.h>
 #if (__GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1) || defined _NEWLIB_VERSION
 #include <netpacket/packet.h>
@@ -43,7 +35,7 @@
 #endif
 
 #include "common.h"
-#include "socket.h"
+
 
 int read_interface(char *interface, int *ifindex, uint32_t *addr, uint8_t *arp)
 {
@@ -52,44 +44,42 @@
 	struct sockaddr_in *our_ip;
 
 	memset(&ifr, 0, sizeof(struct ifreq));
-	if((fd = socket(AF_INET, SOCK_RAW, IPPROTO_RAW)) >= 0) {
-		ifr.ifr_addr.sa_family = AF_INET;
-		strcpy(ifr.ifr_name, interface);
-
-		if (addr) {
-			if (ioctl(fd, SIOCGIFADDR, &ifr) == 0) {
-				our_ip = (struct sockaddr_in *) &ifr.ifr_addr;
-				*addr = our_ip->sin_addr.s_addr;
-				DEBUG("%s (our ip) = %s", ifr.ifr_name, inet_ntoa(our_ip->sin_addr));
-			} else {
-				bb_perror_msg("SIOCGIFADDR failed, is the interface up and configured?");
-				close(fd);
-				return -1;
-			}
-		}
-
-		if (ioctl(fd, SIOCGIFINDEX, &ifr) == 0) {
-			DEBUG("adapter index %d", ifr.ifr_ifindex);
-			*ifindex = ifr.ifr_ifindex;
-		} else {
-			bb_perror_msg("SIOCGIFINDEX failed");
-			close(fd);
-			return -1;
-		}
-		if (ioctl(fd, SIOCGIFHWADDR, &ifr) == 0) {
-			memcpy(arp, ifr.ifr_hwaddr.sa_data, 6);
-			DEBUG("adapter hardware address %02x:%02x:%02x:%02x:%02x:%02x",
-				arp[0], arp[1], arp[2], arp[3], arp[4], arp[5]);
-		} else {
-			bb_perror_msg("SIOCGIFHWADDR failed");
-			close(fd);
-			return -1;
-		}
-	} else {
+	fd = socket(AF_INET, SOCK_RAW, IPPROTO_RAW);
+	if (fd < 0) {
 		bb_perror_msg("socket failed");
 		return -1;
 	}
-	close(fd);
+
+	ifr.ifr_addr.sa_family = AF_INET;
+	strcpy(ifr.ifr_name, interface);
+	if (addr) {
+		if (ioctl(fd, SIOCGIFADDR, &ifr) == 0) {
+			bb_perror_msg("SIOCGIFADDR failed, is the interface up and configured?");
+			close(fd);
+			return -1;
+		}
+		our_ip = (struct sockaddr_in *) &ifr.ifr_addr;
+		*addr = our_ip->sin_addr.s_addr;
+		DEBUG("%s (our ip) = %s", ifr.ifr_name, inet_ntoa(our_ip->sin_addr));
+	}
+
+	if (ioctl(fd, SIOCGIFINDEX, &ifr) == 0) {
+		bb_perror_msg("SIOCGIFINDEX failed");
+		close(fd);
+		return -1;
+	}
+
+	DEBUG("adapter index %d", ifr.ifr_ifindex);
+	*ifindex = ifr.ifr_ifindex;
+	if (ioctl(fd, SIOCGIFHWADDR, &ifr) != 0) {
+		bb_perror_msg("SIOCGIFHWADDR failed");
+		close(fd);
+		return -1;
+	}
+
+	memcpy(arp, ifr.ifr_hwaddr.sa_data, 6);
+	DEBUG("adapter hardware address %02x:%02x:%02x:%02x:%02x:%02x",
+		arp[0], arp[1], arp[2], arp[3], arp[4], arp[5]);
 	return 0;
 }
 
@@ -102,7 +92,8 @@
 	int n = 1;
 
 	DEBUG("Opening listen socket on 0x%08x:%d %s", ip, port, inf);
-	if ((fd = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) {
+	fd = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
+	if (fd < 0) {
 		bb_perror_msg("socket");
 		return -1;
 	}
diff --git a/networking/udhcp/socket.h b/networking/udhcp/socket.h
deleted file mode 100644
index 23bffa1..0000000
--- a/networking/udhcp/socket.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/* vi: set sw=4 ts=4: */
-/* socket.h */
-#ifndef _SOCKET_H
-#define _SOCKET_H
-
-int read_interface(char *interface, int *ifindex, uint32_t *addr, uint8_t *arp);
-int listen_socket(uint32_t ip, int port, char *inf);
-
-#endif
diff --git a/networking/udhcp/static_leases.c b/networking/udhcp/static_leases.c
index 0d962c5..b53eac5 100644
--- a/networking/udhcp/static_leases.c
+++ b/networking/udhcp/static_leases.c
@@ -7,20 +7,15 @@
  *
  */
 
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "static_leases.h"
+#include "common.h"
 #include "dhcpd.h"
 
+
 /* Takes the address of the pointer to the static_leases linked list,
  *   Address to a 6 byte mac address
  *   Address to a 4 byte ip address */
 int addStaticLease(struct static_lease **lease_struct, uint8_t *mac, uint32_t *ip)
 {
-
 	struct static_lease *cur;
 	struct static_lease *new_static_lease;
 
@@ -31,15 +26,11 @@
 	new_static_lease->next = NULL;
 
 	/* If it's the first node to be added... */
-	if(*lease_struct == NULL)
-	{
+	if (*lease_struct == NULL) {
 		*lease_struct = new_static_lease;
-	}
-	else
-	{
+	} else {
 		cur = *lease_struct;
-		while(cur->next != NULL)
-		{
+		while (cur->next) {
 			cur = cur->next;
 		}
 
@@ -47,7 +38,6 @@
 	}
 
 	return 1;
-
 }
 
 /* Check to see if a mac has an associated static lease */
@@ -59,11 +49,9 @@
 
 	return_ip = 0;
 
-	while(cur != NULL)
-	{
+	while (cur) {
 		/* If the client has the correct mac  */
-		if(memcmp(cur->mac, mac, 6) == 0)
-		{
+		if (memcmp(cur->mac, mac, 6) == 0) {
 			return_ip = *(cur->ip);
 		}
 
@@ -71,7 +59,6 @@
 	}
 
 	return return_ip;
-
 }
 
 /* Check to see if an ip is reserved as a static ip */
@@ -81,17 +68,15 @@
 
 	uint32_t return_val = 0;
 
-	while(cur != NULL)
-	{
+	while (cur) {
 		/* If the client has the correct ip  */
-		if(*cur->ip == ip)
+		if (*cur->ip == ip)
 			return_val = 1;
 
 		cur = cur->next;
 	}
 
 	return return_val;
-
 }
 
 #ifdef CONFIG_FEATURE_UDHCP_DEBUG
@@ -102,8 +87,7 @@
 	/* Get a pointer to the linked list */
 	struct static_lease *cur = *arg;
 
-	while(cur != NULL)
-	{
+	while (cur) {
 		/* printf("PrintStaticLeases: Lease mac Address: %x\n", cur->mac); */
 		printf("PrintStaticLeases: Lease mac Value: %x\n", *(cur->mac));
 		/* printf("PrintStaticLeases: Lease ip Address: %x\n", cur->ip); */
@@ -111,10 +95,5 @@
 
 		cur = cur->next;
 	}
-
-
 }
 #endif
-
-
-
diff --git a/networking/udhcp/static_leases.h b/networking/udhcp/static_leases.h
deleted file mode 100644
index b23bbcf..0000000
--- a/networking/udhcp/static_leases.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* vi: set sw=4 ts=4: */
-/* static_leases.h */
-#ifndef _STATIC_LEASES_H
-#define _STATIC_LEASES_H
-
-#include "dhcpd.h"
-
-/* Config file will pass static lease info to this function which will add it
- * to a data structure that can be searched later */
-int addStaticLease(struct static_lease **lease_struct, uint8_t *mac, uint32_t *ip);
-
-/* Check to see if a mac has an associated static lease */
-uint32_t getIpByMac(struct static_lease *lease_struct, void *arg);
-
-/* Check to see if an ip is reserved as a static ip */
-uint32_t reservedIp(struct static_lease *lease_struct, uint32_t ip);
-
-/* Print out static leases just to check what's going on (debug code) */
-void printStaticLeases(struct static_lease **lease_struct);
-
-#endif
-
-
-
