Use memmove for moving elements of dynamic array
Testing and fixing ridiculous bugs