LP-44 - some optimizations and cleanup