Restructure project - fix errors