Sync with development branch

Fix some bugs and add travis CI configuration