modified code generator logics and repositories
add terminal socket support