merge from google code and 0.3.1 release