Added dynamic memory allocation for the results buffer, added support for multiple columns, fixed segfault