Got rid of some warnings and added some appropriate messages.

Performance is really going to be an issue we need to look at how we can
optimize this. I'll try to see if I can do that tomorrow.
Cleaned some stuff up and added many comments.