Updated h16k script - needs clean-up but should work