Add more elaborate structure, modify to work without the multistage gem