Added string manipulation functions, wrappers for checking mem allocations, removed static array declarations