add crude console. Also bug fixes