Added LSS code and other enhancements