Made a few things big to minimize segfaults, these changes have to be analyzed in the future