Add SHA512 and clean goto