Added parsing input, executing commands

Parsing input from thread1 from read() and executing them in thread2