A few tests added, some functionalities repaired.