Performance

Made some minor performance improvements.