Updated to latest libraries

* Code adapted to latest Locus API changes