Fixed some test case failures, upgrade to scala 2.10.4, and other minor improvements.