Testing and bug fixes