Refactor functions into extra file. Implement dummy encryption