Fix cast class exception
Updated travis config

Made the tests more verbose