WIP - Feature/293 function rename

I would like a quick glance at my PR please. 
I struggle to find a clean way to implement rename function for files, if you have any ideas ?