Major improvements to the RLS algorithm