Changed Getters and Removed Copy/Paste Code

There was a whole mess of copied and pasted code speckled all over the code base.  I moved that code to functions/methods in the util.go file and changed all instances of that copy/paste code to use the new functions/methods.

I've also changed the getters for the data interfaces.  Unfortunately, the attributes need to be exported for most database libraries to be able to use them, but the getters and setters still need to be there so that people using the library can extend those types as they see fit.  The getters are no longer using the Go standard, because I can't think of a better way to deal with this at the moment.