Fix project layout and build command, add missing struct definitions