first cut sha2 + code cleanup and constants separation