Rearrange code in hjb file.