Flipped input matrix about vertical to correct coordinates. Did not implement angled boundaries yet -- doesn't seem necessary, we can investigate more tonight.