init + a metric tonne of work
merged from github, resolved conflicts