Performance

Did some fixes to remove unnecessary overhead.