Re-factored configuration and hash functions