Some code cleanup. Added Shell type