performance improvements and (implicit) stability fixes

stability fixes were done through linked libraries