restructure; add build system