Cleaned up snippet