Fixed a few quirks and added some documentation here and there