Created generateRegisteredHCP in order to communicate with the back-end.
Some minor changes on other parts.