refactor courier service

attempt at memory management and garbage collection