Ported basic component recognition.
It's still buggy, output is mostly garbled...