Refactored to include numerous tests. Project will not run correctly.