restructure code base, validation protocol