Refactor scanner

Currently, the compiler performs some scanning – the Scanner returns the content of components pretty much unmodified, in raw form.

This PR moves the responsibility for splitting components into their syntactic elements into the Scanner. This is a cleaner separation that will more easily allow for new component types.