Cleaned up code by removing shared code from the 2007 branch and removed the (now unneeded) preprocessor for the asw branch.