Adding and fixing tests