tidied up mapper code a bit
tidied up cypher code a bit
tidied up entityaccess code a bit
tidied up metadata code a bit