Silence compiler warnings
Refactoring
Correct runtime complexity
Support non x86 CPU architectures.