Refactoring of files and implementation of RS box