Fixed a bug with hardware clocked input and implemented software clocked input.