Bug fixing and testing