Transition Metal Dichalcogenide Based Memory Devices and Transistors