Code Analysis clean up.
Moved string literals for exceptions into resource file.
Added the start of the unit tests.