Created address API, fixing a few dependent bugs, logs added