WIP: Segfaulting when doing rotation invariance...