Tests & Bug fixing