Refactoring: C handles low-level bit twiddling only, JS handles what's actually being written.