hpet: Coding style cleanups and some refactorings