Added code to allow for this to work with the latest Hammer format.
Fixed some errors and warnings.