cleaned for open source, initial commit