Travis CI integration. Fixed some syntatical errors and corrected invalidate() tests