How to have a smooth movement into grid-based lanes like Bomberman/Pacman ?

I have my Player with a box collider 2D and have placed boxes in grid like placement, just like Bomberman has. When I try to move through them, the movement is supremely jagged and very jittery because the Player collides with the boxes that do not allow it to move inside the lane. How can I create a motion that smoothens this out and allows for smoother turns in and out of the lanes ?

For better explanation, kindly check the 120kb screen captured video HERE.

Here is the script that I made for the navigation for the Player.

public class PlayerMovement : MonoBehaviour {

	public bool horizontalPressed;
	public bool verticalPressed;

	void Start(){
		horizontalPressed = false;
		verticalPressed = false;
	}

	void Update() {

		transform.position += transform.up * 10 * Time.deltaTime;

		if (!horizontalPressed){
			if (Input.GetKey(KeyCode.W)){
			
				transform.rotation = Quaternion.identity; transform.Rotate (0, 0, 0);
				verticalPressed = true;
			} 
			
			else if (Input.GetKey(KeyCode.S)){
				transform.rotation = Quaternion.identity; transform.Rotate (0, 0, 180);
				verticalPressed = true;
			}

			else verticalPressed = false;
		}

		if (!verticalPressed){
			if (Input.GetKey(KeyCode.D)){
				transform.rotation = Quaternion.identity; transform.Rotate (0, 0, 270);	
				horizontalPressed = true;
			} 
			
			else if (Input.GetKey(KeyCode.A)){
				transform.rotation = Quaternion.identity; transform.Rotate (0, 0, 90);
				horizontalPressed = true;
			}

			else horizontalPressed = false;
		}

	}
}

I managed to get the movement to smoothen out by using MoveTowards, but I still haven’t been able to get rid of the wonky collisions. The below is the code for a grid based movement.

using UnityEngine;
using System.Collections;

public class ControllerScript : MonoBehaviour {
	public float speed = 1.0f;
	
	private Vector3 endpos;
	private bool moving = false;
	
	void Start () {
		endpos  = transform.position;
	}
	
	void Update () {
		if (moving && (transform.position == endpos))
			moving = false;
		
		if(!moving && Input.GetKey(KeyCode.W)){
			moving = true;
			endpos = transform.position + Vector3.up;
		}

		if(!moving && Input.GetKey(KeyCode.S)){
			moving = true;
			endpos = transform.position + Vector3.down;
		}

		if(!moving && Input.GetKey(KeyCode.A)){
			moving = true;
			endpos = transform.position + Vector3.left;
		}

		if(!moving && Input.GetKey(KeyCode.D)){
			moving = true;
			endpos = transform.position + Vector3.right;
		}
		
		transform.position = Vector3.MoveTowards(transform.position, endpos, Time.deltaTime * speed);
	}
}