Fixed tests and fixed dependencies in headers