Now determines top-left visible card

Also a bunch of code cleanup for transitions