Depopt lwt + necessary refactoring.