Added the rest of the things that were missing, fixed miscellaneous bugs
Fixed some bugs