Add some documentation
Rename that function
Simplify the implementation a bit
Search/replace gone bad!