make connection to the legal profiles db thead-safe
remove old code
remove unused arguments folder