Added and fixed some tests