Commented out unnecessary functions using too much memory