Fixed some errors from the cleanup