moving the import for warnings out of the individual methods and a styling fix