Alot of fixes
Minor refactory with dynamic base urls to get proper urls on the remote server