Cleanup warnings
refactored