cleaned up commented code, removed 'exhaustive checking' warnings