Component tests

These commits will need to be squashed before the branch is merged into master - they'll be cleaned up before it's merged.