Restructure Application and fix routes