[loader] cleaned code, final tests.

21 jobs for master in 1 minute and 43 seconds (queued for 10 seconds)