added tests for custom trait testing, and fixed several tests