Clean up code to remove minor warnings