Tidied up files and made randomBytes more complient