added logging and REST client logic
added some diagrams