Some refactoring

Some changes to the code were made added random string generator