Test fixes: Remove extra lines, reorder code to add clarity