Removing warnings from code