added abstract rest loader, based on threads
Merge branch 'rest'