Convert tabs to spaces
Created a clear function for flushing memory caches