Cleaned up code to pass Travis CI