Added new commands for querying head information.
Formatting clean up to facilitate some pep8 compliance.