add --debug flag, add change parsing, fix various nits