restructure and slimmify