Test related modifications

- Setup guard
- Setup Travis build
- Fix some tests