Implemented basic loop and command reading.