Fix minor mistake and misc cleanup