Modified port to conform with RFC. Fixed a couple basic bugs. Cleaned
up printing behavior.