3.0-pre7:
removed compiler warnings, now compiles with -Wall and no warnings, thanks to Halcy0n for some assistance

3.0-pre6:

Tidied up the code a bit..
Changed the port calculation code to use int instead of short
