Add test cases for using this inside predicates and some cleanup.
Add travis badge.