Upgrade to scala 2.10.4 and fix test cases