Fix segmentation fault with tests
Fix indentation to spaces from tabs
Fix import issue
Fix unittests running on Travis CI