Added a concat() function and a few basic tests.
An additional bit of const correcteness.