-Removed all instances of unnecessary cast when using malloc()
-Added/corrected more documentation