Removed dead code (ajax checks) also fixed telephone lookup bug, the code for which was probably in the wrong place anyway
Also added proper mongo document lookup for thigns within the 'details' structure