formatting change
add .gitignore
print stacktrace (debugging) and change baseurl
load keys from file (easier to debug + revision control)
generalizing a bit
printing some debugging