Added concatenate and some bugfixes