Add cross platform hashing and fix syntax errors