Minor modifications after testing code