Fixing tests and cleanup for ubuntu/debian