pull changes from my fork

These are all the changes to incorporate travis-ci. Will need to update config afterwards.