Created Navigation & optimized some code