Hi there.
I've just read through your code which seems to be quite good, so I only have a couple of general items to mention.
First of all, if this isn't in a package, create one and put it in there.
Second, in the package specification you should declare some constants to make the code more...