Index: doc/theses/colby_parsons_MMAth/style/style.tex
===================================================================
--- doc/theses/colby_parsons_MMAth/style/style.tex	(revision e8b1f23cd102fb449af44ce3bc0dd3f065d72ec9)
+++ doc/theses/colby_parsons_MMAth/style/style.tex	(revision 9363b1b75d922f4913c32d04c265d16fe3642b62)
@@ -3,73 +3,5 @@
 \lstset{language=CFA}					% default language
 
-\lstdefinestyle{defaultStyle}{
-    escapeinside={@@},
-    %  basicstyle=\linespread{0.9}\tt\footnotesize,		% reduce line spacing and use typewriter font
-      basicstyle=\linespread{0.9}\sf,		% reduce line spacing and use typewriter font
-    %  keywordstyle=\bfseries\color{blue},
-    %  keywordstyle=[2]\bfseries\color{Plum},
-    %  commentstyle=\sf\itshape\color{OliveGreen},		  % green and italic comments
-    %  identifierstyle=\color{identifierCol},
-    %  stringstyle=\sf\color{Mahogany},			          % use sanserif font
-      stringstyle=\tt,			          % use sanserif font
-      mathescape=true,
-    %  columns=fixed,
-      columns=fullflexible,
-    %  aboveskip=4pt,                                  % spacing above/below code block
-    %  belowskip=3pt,
-      keepspaces=true,
-      tabsize=4,
-      % frame=lines,
-      literate=,
-      showlines=true,                                 % show blank lines at end of code
-      showspaces=false,
-      showstringspaces=false,
-      showlines=true,							% show blank lines at end of code
-      escapechar=\$,
-      xleftmargin=\parindentlnth,                     % indent code to paragraph indentation
-      moredelim=[is][\color{red}\bfseries]{**R**}{**R**},    % red highlighting
-      morekeywords=[2]{accept, signal, signal_block, wait, waitfor, waituntil},
-      abovecaptionskip=5pt,
-}
-
-\lstdefinestyle{cfaStyle}{
-  escapeinside={@@},
-  basicstyle=\linespread{0.9}\sf,		% reduce line spacing and use typewriter font
-  stringstyle=\tt,			          % use sanserif font
-  mathescape=true,
-  columns=fullflexible,
-  keepspaces=true,
-  tabsize=4,
-  literate=,
-  showlines=true,                                 % show blank lines at end of code
-  showspaces=false,
-  showstringspaces=false,
-  showlines=true,							% show blank lines at end of code
-  escapechar=\$,
-  xleftmargin=\parindentlnth,                     % indent code to paragraph indentation
-  moredelim=[is][\color{red}\bfseries]{**R**}{**R**},    % red highlighting
-  morekeywords=[2]{accept, signal, signal_block, wait, waitfor, waituntil},
-  abovecaptionskip=5pt,
-}
-
-\lstnewenvironment{cfacode}[1][]{
-  \lstset{
-    language = CFA,
-    style=cfaStyle,
-    captionpos=b,
-    #1
-  }
-}{}
-
-\lstnewenvironment{cppcode}[1][]{
-  \lstset{
-    language = c++,
-    style=defaultStyle,
-    captionpos=b,
-    #1
-  }
-}{}
-
-\newcommand{\code}[1]{\lstinline[language=CFA,style=cfaStyle]{#1}}
+\newcommand{\code}[1]{\lstinline[language=CFA]{#1}}
 \newcommand{\uC}{$\mu$\CC}
 
Index: doc/theses/colby_parsons_MMAth/text/CFA_concurrency.tex
===================================================================
--- doc/theses/colby_parsons_MMAth/text/CFA_concurrency.tex	(revision e8b1f23cd102fb449af44ce3bc0dd3f065d72ec9)
+++ doc/theses/colby_parsons_MMAth/text/CFA_concurrency.tex	(revision 9363b1b75d922f4913c32d04c265d16fe3642b62)
@@ -17,5 +17,5 @@
 A thread terminates by returning from the main routine where it starts.
 
-\begin{cfacode}[tabsize=3,caption={\CFA user thread and processor creation},label={l:cfa_thd_init}]
+\begin{cfa}[tabsize=3,caption={\CFA user thread and processor creation},label={l:cfa_thd_init}]
 
 thread my_thread {}     // user thread type
@@ -33,3 +33,3 @@
 }
 
-\end{cfacode}
+\end{cfa}
Index: doc/theses/colby_parsons_MMAth/text/actors.tex
===================================================================
--- doc/theses/colby_parsons_MMAth/text/actors.tex	(revision e8b1f23cd102fb449af44ce3bc0dd3f065d72ec9)
+++ doc/theses/colby_parsons_MMAth/text/actors.tex	(revision 9363b1b75d922f4913c32d04c265d16fe3642b62)
@@ -88,5 +88,5 @@
 Similarly to create a message type a user must define a struct which \code{inline}'s the base \code{message} struct.
 
-\begin{cfacode}
+\begin{cfa}
 struct derived_actor {
     inline actor;       // Plan-9 C inheritance
@@ -118,5 +118,5 @@
     return 0;
 }
-\end{cfacode}
+\end{cfa}
 
 The above code is a simple actor program in \CFA. 
@@ -125,19 +125,19 @@
 Key things to highlight include the \code{receive} signature, and calls to \code{start_actor_system}, and \code{stop_actor_system}. 
 To define a behaviour for some derived actor and derived message type, one must declare a routine with the signature:
-\begin{cfacode}
+\begin{cfa}
 Allocation receive( derived_actor & receiver, derived_msg & msg )
-\end{cfacode}
+\end{cfa}
 Where \code{derived_actor} and \code{derived_msg} can be any derived actor and derived message types respectively. 
 The return value of \code{receive} must be a value from the \code{Allocation} enum:
-\begin{cfacode}
+\begin{cfa}
 enum Allocation { Nodelete, Delete, Destroy, Finished };
-\end{cfacode}
+\end{cfa}
 The \code{Allocation} enum is a set of actions that dictate what the executor should do with a message or actor after a given behaviour has been completed. 
 In the case of an actor, the \code{receive} routine returns the \code{Allocation} status to the executor which sets the status on the actor and takes the appropriate action. 
 For messages, they either default to \code{Nodelete}, or they can be passed an \code{Allocation} via the \code{message} constructor. 
 Message state can be updated via a call to:
-\begin{cfacode}
+\begin{cfa}
 void set_allocation( message & this, Allocation state )
-\end{cfacode}
+\end{cfa}
 
 The following describes the use of each of the \code{Allocation} values:
@@ -186,7 +186,7 @@
 All message sends are done using the left shift operater, \ie <<, similar to the syntax of \CC's output. 
 The signature of the left shift operator is:
-\begin{cfacode}
+\begin{cfa}
 Allocation ?<<?( derived_actor & receiver, derived_msg & msg )
-\end{cfacode}
+\end{cfa}
 
 An astute eye will notice that this is the same signature as the \code{receive} routine which is no coincidence. 
@@ -368,5 +368,5 @@
 To first verify sequential correctness, consider the equivalent sequential swap below:
 
-\begin{cfacode}
+\begin{cfa}
 void swap( uint victim_idx, uint my_idx  ) {
     // Step 0:
@@ -380,5 +380,5 @@
     request_queues[my_idx] = vic_queue;
 }
-\end{cfacode}
+\end{cfa}
 
 Step 1 is missing in the sequential example since in only matter in the concurrent context presented later. 
@@ -386,5 +386,5 @@
 Temporary copies of each pointer being swapped are stored, and then the original values of each pointer are set using the copy of the other pointer.
 
-\begin{cfacode}
+\begin{cfa}
 // This routine is atomic
 bool CAS( work_queue ** ptr, work_queue ** old, work_queue * new ) {
@@ -427,5 +427,5 @@
     return true;
 }
-\end{cfacode}\label{c:swap}
+\end{cfa}\label{c:swap}
 
 Now consider the concurrent implementation of the swap.
Index: doc/theses/colby_parsons_MMAth/text/channels.tex
===================================================================
--- doc/theses/colby_parsons_MMAth/text/channels.tex	(revision e8b1f23cd102fb449af44ce3bc0dd3f065d72ec9)
+++ doc/theses/colby_parsons_MMAth/text/channels.tex	(revision 9363b1b75d922f4913c32d04c265d16fe3642b62)
@@ -118,5 +118,5 @@
 Also note that in the Go version~\ref{l:go_chan_bar}, the size of the barrier channels has to be larger than in the \CFA version to ensure that the main thread does not block when attempting to clear the barrier.
 
-\begin{cfacode}[tabsize=3,caption={\CFA channel barrier termination},label={l:cfa_chan_bar}]
+\begin{cfa}[tabsize=3,caption={\CFA channel barrier termination},label={l:cfa_chan_bar}]
 struct barrier {
     channel( int ) barWait;
@@ -171,7 +171,7 @@
     return 0;
 }
-\end{cfacode}
-
-\begin{cfacode}[tabsize=3,caption={Go channel barrier termination},label={l:go_chan_bar}]
+\end{cfa}
+
+\begin{cfa}[tabsize=3,caption={Go channel barrier termination},label={l:go_chan_bar}]
 
 struct barrier {
@@ -237,5 +237,5 @@
     return 0;
 }
-\end{cfacode}
+\end{cfa}
 
 In Listing~\ref{l:cfa_resume} an example of channel closing with resumption is used. 
@@ -244,5 +244,5 @@
 If the same program was implemented in Go it would require explicit synchronization with both producers and consumers by some mechanism outside the channel to ensure that all elements were removed before task termination.
 
-\begin{cfacode}[tabsize=3,caption={\CFA channel resumption usage},label={l:cfa_resume}]
+\begin{cfa}[tabsize=3,caption={\CFA channel resumption usage},label={l:cfa_resume}]
 channel( int ) chan{ 128 };
 
@@ -280,5 +280,5 @@
     return 0;
 }
-\end{cfacode}
+\end{cfa}
 
 \section{Performance}
Index: doc/theses/colby_parsons_MMAth/text/mutex_stmt.tex
===================================================================
--- doc/theses/colby_parsons_MMAth/text/mutex_stmt.tex	(revision e8b1f23cd102fb449af44ce3bc0dd3f065d72ec9)
+++ doc/theses/colby_parsons_MMAth/text/mutex_stmt.tex	(revision 9363b1b75d922f4913c32d04c265d16fe3642b62)
@@ -12,5 +12,5 @@
 Additionally, it provides the safety guarantee of deadlock-freedom, both by acquiring the locks in a deadlock-free manner, and by ensuring that the locks release on error, or normal program execution via \gls{raii}.
 
-\begin{cfacode}[tabsize=3,caption={\CFA mutex statement usage},label={l:cfa_mutex_ex}]
+\begin{cfa}[tabsize=3,caption={\CFA mutex statement usage},label={l:cfa_mutex_ex}]
 owner_lock lock1, lock2, lock3;
 int count = 0; 
@@ -20,5 +20,5 @@
 }
 mutex( lock2, lock3 ) count++; // or inline statement
-\end{cfacode}
+\end{cfa}
 
 \section{Other Languages}
@@ -32,5 +32,5 @@
 An example of \CC scoped\_lock usage is shown in Listing~\ref{l:cc_scoped_lock}.
 
-\begin{cppcode}[tabsize=3,caption={\CC scoped\_lock usage},label={l:cc_scoped_lock}]
+\begin{cfa}[tabsize=3,caption={\CC scoped\_lock usage},label={l:cc_scoped_lock}]
 std::mutex lock1, lock2, lock3;
 {
@@ -38,5 +38,5 @@
     // locks are released via raii at end of scope
 }
-\end{cppcode}
+\end{cfa}
 
 \section{\CFA implementation}
@@ -58,8 +58,8 @@
 This use case is shown in Listing~\ref{l:sout}.
 
-\begin{cfacode}[tabsize=3,caption={\CFA sout with mutex statement},label={l:sout}]
+\begin{cfa}[tabsize=3,caption={\CFA sout with mutex statement},label={l:sout}]
 mutex( sout )
     sout | "This output is protected by mutual exclusion!"; 
-\end{cfacode}
+\end{cfa}
 
 \section{Deadlock Avoidance}
@@ -70,5 +70,5 @@
 The algorithm presented is taken directly from the source code of the \code{<mutex>} header, with some renaming and comments for clarity.
 
-\begin{cppcode}[caption={\CC scoped\_lock deadlock avoidance algorithm},label={l:cc_deadlock_avoid}]
+\begin{cfa}[caption={\CC scoped\_lock deadlock avoidance algorithm},label={l:cc_deadlock_avoid}]
 int first = 0;  // first lock to attempt to lock
 do {
@@ -86,5 +86,5 @@
 // if first lock is still held then all have been acquired
 } while (!locks[first].owns_lock());  // is first lock held?
-\end{cppcode}
+\end{cfa}
 
 The algorithm in \ref{l:cc_deadlock_avoid} successfully avoids deadlock, however there is a potential livelock scenario. 
