Fixed KEEP. Added some optimizations.