Moved openbts codes into a separate directory and updated their license statements so they can be automatically processed
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 18619e3..1686de5 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -35,12 +35,12 @@
     demapping/tch_f_chans_demapper_impl.cc
     decoding/control_channels_decoder_impl.cc
     decoding/tch_f_decoder_impl.cc
-    decoding/AmrCoder.cpp
-    decoding/BitVector.cpp
-    decoding/GSM610Tables.cpp
-    decoding/GSM660Tables.cpp
-    decoding/GSM503Tables.cpp
-    decoding/ViterbiR204.cpp
+    decoding/openbts/AmrCoder.cpp
+    decoding/openbts/BitVector.cpp
+    decoding/openbts/GSM610Tables.cpp
+    decoding/openbts/GSM660Tables.cpp
+    decoding/openbts/GSM503Tables.cpp
+    decoding/openbts/ViterbiR204.cpp
     decoding/osmocom/coding/gsm0503_conv.c
     decoding/osmocom/coding/gsm0503_coding.c
     decoding/osmocom/coding/gsm0503_interleaving.c
diff --git a/lib/decoding/GSM610Tables.h b/lib/decoding/GSM610Tables.h
deleted file mode 100644
index 53a8e1c..0000000
--- a/lib/decoding/GSM610Tables.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-* Copyright 2008 Free Software Foundation, Inc.
-*
-* This software is distributed under the terms of the GNU Public License.
-* See the COPYING file in the main directory for details.
-
-    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 3 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, see <http://www.gnu.org/licenses/>.
-
-*/
-
-
-
-#ifndef GSM610TABLES_H
-#define GSM610TABLES_H
-
-
-
-namespace GSM {
-
-/** Table #2 from GSM 05.03 */
-extern unsigned int g610BitOrder[260];
-
-}
-
-
-#endif
diff --git a/lib/decoding/Viterbi.h b/lib/decoding/Viterbi.h
deleted file mode 100644
index 8635bf5..0000000
--- a/lib/decoding/Viterbi.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-* Copyright 2013, 2014 Range Networks, Inc.
-*
-* This software is distributed under multiple licenses;
-* see the COPYING file in the main directory for licensing
-* information for this specific distribution.
-*
-* This use of this software may be subject to additional restrictions.
-* See the LEGAL file in the main directory for details.
-
-    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.
-
-*/
-
-
-#ifndef _VITERBI_H_
-#define _VITERBI_H_ 1
-
-// (pat) Virtual base class for Viterbi and Turbo coder/decoders.
-class ViterbiBase {
-	public:
-	virtual void encode(const BitVector &in, BitVector& target) const = 0;
-	virtual void decode(const SoftVector &in, BitVector& target) = 0;
-	// (pat) Return error count from most recent decoder run.
-	// If you get -1 from this, the method is not defined in the Viterbi class.
-	virtual int getBEC() { return -1; }
-	//virtual ~ViterbiBase();   Currently None of these have destructors.
-
-	// These functions are logically part of the Viterbi functionality, even though they do not use any class variables.
-	unsigned applyPoly(uint64_t val, uint64_t poly);
-	unsigned applyPoly(uint64_t val, uint64_t poly, unsigned order);
-};
-#endif
diff --git a/lib/decoding/AmrCoder.cpp b/lib/decoding/openbts/AmrCoder.cpp
similarity index 98%
rename from lib/decoding/AmrCoder.cpp
rename to lib/decoding/openbts/AmrCoder.cpp
index d02e69c..718baf0 100644
--- a/lib/decoding/AmrCoder.cpp
+++ b/lib/decoding/openbts/AmrCoder.cpp
@@ -1,18 +1,22 @@
 /*
-* Copyright 2013, 2014 Range Networks, Inc.
-*
-* This software is distributed under multiple licenses;
-* see the COPYING file in the main directory for licensing
-* information for this specific distribution.
-*
-* This use of this software may be subject to additional restrictions.
-* See the LEGAL file in the main directory for details.
+ * Copyright 2013, 2014 Range Networks, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 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.
-
-*/
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * This use of this software may be subject to additional restrictions.
+ * See the LEGAL file in the main directory for details.
+ */
 
 
 #include "BitVector.h"
diff --git a/lib/decoding/AmrCoder.h b/lib/decoding/openbts/AmrCoder.h
similarity index 96%
rename from lib/decoding/AmrCoder.h
rename to lib/decoding/openbts/AmrCoder.h
index c1df823..ae49bd0 100644
--- a/lib/decoding/AmrCoder.h
+++ b/lib/decoding/openbts/AmrCoder.h
@@ -1,18 +1,23 @@
 /*
-* Copyright 2013, 2014 Range Networks, Inc.
-*
-* This software is distributed under multiple licenses;
-* see the COPYING file in the main directory for licensing
-* information for this specific distribution.
-*
-* This use of this software may be subject to additional restrictions.
-* See the LEGAL file in the main directory for details.
+ * Copyright 2013, 2014 Range Networks, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 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.
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * This use of this software may be subject to additional restrictions.
+ * See the LEGAL file in the main directory for details.
+ */
 
-*/
 #ifndef _AMRCODER_H_
 #define _AMRCODER_H_
 #include <stdint.h>
diff --git a/lib/decoding/BitVector.cpp b/lib/decoding/openbts/BitVector.cpp
similarity index 90%
rename from lib/decoding/BitVector.cpp
rename to lib/decoding/openbts/BitVector.cpp
index 86f326a..00730f6 100644
--- a/lib/decoding/BitVector.cpp
+++ b/lib/decoding/openbts/BitVector.cpp
@@ -1,31 +1,23 @@
 /*
-* Copyright 2008, 2009, 2014 Free Software Foundation, Inc.
-* Copyright 2014 Range Networks, Inc.
-*
-*
-* This software is distributed under the terms of the GNU Affero Public License.
-* See the COPYING file in the main directory for details.
-*
-* This use of this software may be subject to additional restrictions.
-* See the LEGAL file in the main directory for details.
-
-	This program is free software: you can redistribute it and/or modify
-	it under the terms of the GNU Affero General Public License as published by
-	the Free Software Foundation, either version 3 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 Affero General Public License for more details.
-
-	You should have received a copy of the GNU Affero General Public License
-	along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-*/
-
-
-
+ * Copyright 2008, 2009, 2014 Free Software Foundation, Inc.
+ * Copyright 2014 Range Networks, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * This use of this software may be subject to additional restrictions.
+ * See the LEGAL file in the main directory for details.
+ */
 
 #include "BitVector.h"
 #include <iostream>
diff --git a/lib/decoding/BitVector.h b/lib/decoding/openbts/BitVector.h
similarity index 91%
rename from lib/decoding/BitVector.h
rename to lib/decoding/openbts/BitVector.h
index 0899817..c8782eb 100644
--- a/lib/decoding/BitVector.h
+++ b/lib/decoding/openbts/BitVector.h
@@ -1,28 +1,23 @@
 /*
-* Copyright 2008, 2009, 2014 Free Software Foundation, Inc.
-* Copyright 2014 Range Networks, Inc.
-*
-* This software is distributed under the terms of the GNU Affero Public License.
-* See the COPYING file in the main directory for details.
-*
-* This use of this software may be subject to additional restrictions.
-* See the LEGAL file in the main directory for details.
-
-	This program is free software: you can redistribute it and/or modify
-	it under the terms of the GNU Affero General Public License as published by
-	the Free Software Foundation, either version 3 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 Affero General Public License for more details.
-
-	You should have received a copy of the GNU Affero General Public License
-	along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-*/
-
+ * Copyright 2008, 2009, 2014 Free Software Foundation, Inc.
+ * Copyright 2014 Range Networks, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * This use of this software may be subject to additional restrictions.
+ * See the LEGAL file in the main directory for details.
+ */
 
 #ifndef BITVECTORS_H
 #define BITVECTORS_H
diff --git a/lib/decoding/GSM503Tables.cpp b/lib/decoding/openbts/GSM503Tables.cpp
similarity index 93%
rename from lib/decoding/GSM503Tables.cpp
rename to lib/decoding/openbts/GSM503Tables.cpp
index 02150f2..fb0f235 100644
--- a/lib/decoding/GSM503Tables.cpp
+++ b/lib/decoding/openbts/GSM503Tables.cpp
@@ -1,18 +1,22 @@
 /*
-* Copyright 2012, 2014 Range Networks, Inc.
-*
-* This software is distributed under multiple licenses; see the COPYING file in the main directory for licensing information for this specific distribution.
-*
-* This use of this software may be subject to additional restrictions.
-* See the LEGAL file in the main directory for details.
-
-    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.
-
-*/
-
-
+ * Copyright 2012, 2014 Range Networks, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * This use of this software may be subject to additional restrictions.
+ * See the LEGAL file in the main directory for details.
+ */
 
 #include "GSM503Tables.h"
 
diff --git a/lib/decoding/GSM503Tables.h b/lib/decoding/openbts/GSM503Tables.h
similarity index 67%
rename from lib/decoding/GSM503Tables.h
rename to lib/decoding/openbts/GSM503Tables.h
index 6b6327c..1fe405e 100644
--- a/lib/decoding/GSM503Tables.h
+++ b/lib/decoding/openbts/GSM503Tables.h
@@ -1,18 +1,22 @@
 /*
-* Copyright 2012, 2014 Range Networks, Inc.
-*
-* This software is distributed under multiple licenses; see the COPYING file in the main directory for licensing information for this specific distribution.
-*
-* This use of this software may be subject to additional restrictions.
-* See the LEGAL file in the main directory for details.
-
-    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.
-
-*/
-
-
+ * Copyright 2012, 2014 Range Networks, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * This use of this software may be subject to additional restrictions.
+ * See the LEGAL file in the main directory for details.
+ */
 
 #ifndef GSM503TABLES_H
 #define GSM503TABLES_H
diff --git a/lib/decoding/GSM610Tables.cpp b/lib/decoding/openbts/GSM610Tables.cpp
similarity index 94%
rename from lib/decoding/GSM610Tables.cpp
rename to lib/decoding/openbts/GSM610Tables.cpp
index 38f643f..1b08496 100644
--- a/lib/decoding/GSM610Tables.cpp
+++ b/lib/decoding/openbts/GSM610Tables.cpp
@@ -1,25 +1,22 @@
 /*
-* Copyright 2008 Free Software Foundation, Inc.
-*
-* This software is distributed under the terms of the GNU Public License.
-* See the COPYING file in the main directory for details.
-
-    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 3 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, see <http://www.gnu.org/licenses/>.
-
-*/
-
-
+ * Copyright 2008 Free Software Foundation, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * This use of this software may be subject to additional restrictions.
+ * See the LEGAL file in the main directory for details.
+ */
 
 #include "GSM610Tables.h"
 
diff --git a/lib/decoding/openbts/GSM610Tables.h b/lib/decoding/openbts/GSM610Tables.h
new file mode 100644
index 0000000..0b8d64f
--- /dev/null
+++ b/lib/decoding/openbts/GSM610Tables.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2008 Free Software Foundation, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * This use of this software may be subject to additional restrictions.
+ * See the LEGAL file in the main directory for details.
+ */
+
+#ifndef GSM610TABLES_H
+#define GSM610TABLES_H
+
+
+
+namespace GSM {
+
+/** Table #2 from GSM 05.03 */
+extern unsigned int g610BitOrder[260];
+
+}
+
+
+#endif
diff --git a/lib/decoding/GSM660Tables.cpp b/lib/decoding/openbts/GSM660Tables.cpp
similarity index 95%
rename from lib/decoding/GSM660Tables.cpp
rename to lib/decoding/openbts/GSM660Tables.cpp
index 520a6c1..e5687c3 100644
--- a/lib/decoding/GSM660Tables.cpp
+++ b/lib/decoding/openbts/GSM660Tables.cpp
@@ -1,23 +1,26 @@
-/* EFR (GSM 06.60) importance bit ordering */
-
 /*
  * Copyright 2010  Sylvain Munaut <tnt@246tNt.com>
  * All Rights Reserved
  *
  * 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
+ * it under the terms of the GNU Affero General Public License as published by
  * the Free Software Foundation, either version 3 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.
+ * GNU Affero General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * This use of this software may be subject to additional restrictions.
+ * See the LEGAL file in the main directory for details.
  */
 
+/* EFR (GSM 06.60) importance bit ordering */
+
 #include "GSM660Tables.h"
 
 unsigned int GSM::g660BitOrder[260] = {
diff --git a/lib/decoding/GSM660Tables.h b/lib/decoding/openbts/GSM660Tables.h
similarity index 62%
rename from lib/decoding/GSM660Tables.h
rename to lib/decoding/openbts/GSM660Tables.h
index 9d639fc..9052c3b 100644
--- a/lib/decoding/GSM660Tables.h
+++ b/lib/decoding/openbts/GSM660Tables.h
@@ -5,17 +5,20 @@
  * All Rights Reserved
  *
  * 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
+ * it under the terms of the GNU Affero General Public License as published by
  * the Free Software Foundation, either version 3 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.
+ * GNU Affero General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * This use of this software may be subject to additional restrictions.
+ * See the LEGAL file in the main directory for details.
  */
 
 #ifndef GSM660TABLES_H
diff --git a/lib/decoding/Vector.h b/lib/decoding/openbts/Vector.h
similarity index 93%
rename from lib/decoding/Vector.h
rename to lib/decoding/openbts/Vector.h
index 23b4dd3..e1224e8 100644
--- a/lib/decoding/Vector.h
+++ b/lib/decoding/openbts/Vector.h
@@ -1,26 +1,25 @@
-/**@file Simplified Vector template with aliases. */
 /*
-* Copyright 2008 Free Software Foundation, Inc.
-* Copyright 2014 Range Networks, Inc.
-*
-* This software is distributed under the terms of the GNU Affero Public License.
-* See the COPYING file in the main directory for details.
-*
-* This use of this software may be subject to additional restrictions.
-* See the LEGAL file in the main directory for details.
-        This program is free software: you can redistribute it and/or modify
-        it under the terms of the GNU Affero General Public License as published by
-        the Free Software Foundation, either version 3 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 Affero General Public License for more details.
-        You should have received a copy of the GNU Affero General Public License
-        along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
+ * Copyright 2008 Free Software Foundation, Inc.
+ * Copyright 2014 Range Networks, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * This use of this software may be subject to additional restrictions.
+ * See the LEGAL file in the main directory for details.
+ */
 
-
+/**@file Simplified Vector template with aliases. */
 
 
 #ifndef VECTOR_H
diff --git a/lib/decoding/openbts/Viterbi.h b/lib/decoding/openbts/Viterbi.h
new file mode 100644
index 0000000..77bd599
--- /dev/null
+++ b/lib/decoding/openbts/Viterbi.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2013, 2014 Range Networks, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * This use of this software may be subject to additional restrictions.
+ * See the LEGAL file in the main directory for details.
+ */
+
+
+#ifndef _VITERBI_H_
+#define _VITERBI_H_ 1
+
+// (pat) Virtual base class for Viterbi and Turbo coder/decoders.
+class ViterbiBase {
+	public:
+	virtual void encode(const BitVector &in, BitVector& target) const = 0;
+	virtual void decode(const SoftVector &in, BitVector& target) = 0;
+	// (pat) Return error count from most recent decoder run.
+	// If you get -1 from this, the method is not defined in the Viterbi class.
+	virtual int getBEC() { return -1; }
+	//virtual ~ViterbiBase();   Currently None of these have destructors.
+
+	// These functions are logically part of the Viterbi functionality, even though they do not use any class variables.
+	unsigned applyPoly(uint64_t val, uint64_t poly);
+	unsigned applyPoly(uint64_t val, uint64_t poly, unsigned order);
+};
+#endif
diff --git a/lib/decoding/ViterbiR204.cpp b/lib/decoding/openbts/ViterbiR204.cpp
similarity index 88%
rename from lib/decoding/ViterbiR204.cpp
rename to lib/decoding/openbts/ViterbiR204.cpp
index 999b31b..296e292 100644
--- a/lib/decoding/ViterbiR204.cpp
+++ b/lib/decoding/openbts/ViterbiR204.cpp
@@ -1,28 +1,23 @@
 /*
-* Copyright 2008, 2009, 2014 Free Software Foundation, Inc.
-* Copyright 2014 Range Networks, Inc.
-*
-*
-* This software is distributed under the terms of the GNU Affero Public License.
-* See the COPYING file in the main directory for details.
-*
-* This use of this software may be subject to additional restrictions.
-* See the LEGAL file in the main directory for details.
-
-	This program is free software: you can redistribute it and/or modify
-	it under the terms of the GNU Affero General Public License as published by
-	the Free Software Foundation, either version 3 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 Affero General Public License for more details.
-
-	You should have received a copy of the GNU Affero General Public License
-	along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-*/
+ * Copyright 2008, 2009, 2014 Free Software Foundation, Inc.
+ * Copyright 2014 Range Networks, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * This use of this software may be subject to additional restrictions.
+ * See the LEGAL file in the main directory for details.
+ */
 
 
 
diff --git a/lib/decoding/ViterbiR204.h b/lib/decoding/openbts/ViterbiR204.h
similarity index 78%
rename from lib/decoding/ViterbiR204.h
rename to lib/decoding/openbts/ViterbiR204.h
index 4fd053f..090f1e8 100644
--- a/lib/decoding/ViterbiR204.h
+++ b/lib/decoding/openbts/ViterbiR204.h
@@ -1,27 +1,23 @@
 /*
-* Copyright 2008, 2009, 2014 Free Software Foundation, Inc.
-* Copyright 2014 Range Networks, Inc.
-*
-* This software is distributed under the terms of the GNU Affero Public License.
-* See the COPYING file in the main directory for details.
-*
-* This use of this software may be subject to additional restrictions.
-* See the LEGAL file in the main directory for details.
-
-	This program is free software: you can redistribute it and/or modify
-	it under the terms of the GNU Affero General Public License as published by
-	the Free Software Foundation, either version 3 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 Affero General Public License for more details.
-
-	You should have received a copy of the GNU Affero General Public License
-	along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-*/
+ * Copyright 2008, 2009, 2014 Free Software Foundation, Inc.
+ * Copyright 2014 Range Networks, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * This use of this software may be subject to additional restrictions.
+ * See the LEGAL file in the main directory for details.
+ */
 
 #ifndef _VITERBIR204_H_
 #define _VITERBIR204_H_ 1