Restructure tree to prepare for server code