Major refactoring

Methods responsible for renaming files was completly rewerite using
regular expresions.
They do same thing but in more efficient way.