Added pretty gotos, made compatible with both Python2 and Python3