Completed test program. Removed magic constants. Fixed comparisons.