Update projection method to be faster

Use memcpy where we can.