General/fixing unit problems

@ssim @mklauser @orbitfold This should fix the problems we have been having with TRAVIS. Please rebase your PRs onto the master after this has been merged (will merge if passing).