init: initial code dump based on Merrick's and Igor's work