Cleaned up memcache code with suggestions from reddit guy
Removed comments