Added liblocCLR, cleaned up and refactored libloc