tidying and added/split scrypt functions