Added hotfix for remove \n in stdin.
Change t_error function so it now uses last bit as parity bit rather than first