diff --git a/lib/card.dart b/lib/card.dart
deleted file mode 100644
index 48d815e..0000000
--- a/lib/card.dart
+++ /dev/null
@@ -1,113 +0,0 @@
-library card;
-
-import 'package:sky/widgets/basic.dart';
-import 'dart:sky' as sky;
-import 'package:vector_math/vector_math.dart' as vector_math;
-
-import 'my_button.dart';
-
-class Card {
-  String deck;
-  String identifier;
-
-  Card(this.deck, this.identifier);
-  Card.fromString(String data) {
-    List<String> parts = data.split(" ");
-    assert(parts.length == 2);
-    this
-      ..deck = parts[0]
-      ..identifier = parts[1];
-  }
-
-  toString() => "${deck} ${identifier}";
-
-  get string => toString();
-}
-
-class CardComponent extends StatefulComponent {
-  // Stateful components
-  double dx;
-  double dy;
-  bool faceUp;
-  bool scrolling;
-
-  final Card card;
-  final Function pointerUpCb;
-
-  static Widget imageFromCard(Card c, bool faceUp) {
-    String imageName = "${c.deck}/${faceUp ? 'up' : 'down'}/${c.identifier}.png";
-    return new NetworkImage(src: imageName);
-  }
-
-  CardComponent(this.card, bool faceUp, [this.pointerUpCb = null]) {
-    this.faceUp = faceUp;
-    dx = 0.0;
-    dy = 0.0;
-    scrolling = false;
-  }
-
-  void syncFields(CardComponent other) {
-    this.dx = other.dx;
-    this.dy = other.dy;
-    this.faceUp = other.faceUp;
-  }
-
-  void _onPressed(sky.Event e) {
-    setState(() {
-      this.faceUp = !this.faceUp;
-    });
-  }
-
-  void _onPointerDown(sky.Event e) {
-    setState(() {
-      scrolling = true;
-    });
-  }
-
-  void _onPointerMove(sky.Event e) {
-    sky.PointerEvent ge = e as sky.PointerEvent;
-    setState(() {
-      dx += ge.dx;
-      dy += ge.dy;
-    });
-  }
-
-  void _onPointerUp(sky.Event e) {
-    //sky.PointerEvent pe = e as sky.PointerEvent;
-    setState(() {
-      if (this.pointerUpCb != null) {
-        pointerUpCb(this.dx, this.dy, this.faceUp);
-      }
-      this.dx = 0.0;
-      this.dy = 0.0;
-      this.faceUp = true;
-      scrolling = false;
-    });
-  }
-
-  Widget build() {
-    return new Container(
-      child: /*new Container(
-        child: */new MyButton(
-          child: imageFromCard(this.card, faceUp),
-          onPressed: _onPressed,
-          onPointerDown: _onPointerDown,
-          onPointerMove: _onPointerMove,
-          onPointerUp: _onPointerUp
-        ),
-      padding: const EdgeDims.all(8.0),
-      //margin: const EdgeDims.symmetric(horizontal: 8.0),
-      decoration: new BoxDecoration(
-        backgroundColor: (this.scrolling ? const Color(0xFFFF0000) : const Color(0xFF0000FF)),
-        borderRadius: 5.0
-      ),
-      transform: new vector_math.Matrix4.identity().translate(dx, dy)
-    );
-  }
-}
-
-// I think we should be free to move cards around the screen as we please.
-// However, that doesn't mean we can tap them willy nilly or let go of them so easily.
-// I propose that.
-// Card follows you onScroll.
-// But onPressed and on
\ No newline at end of file
diff --git a/lib/components/board.dart b/lib/components/board.dart
index 22baa95..8a5aaeb 100644
--- a/lib/components/board.dart
+++ b/lib/components/board.dart
@@ -1,8 +1,10 @@
 import './card.dart' show Card;
 import '../logic/card.dart' as logic_card;
+
+import 'dart:math' as math;
+
 import 'package:sky/widgets.dart' as widgets;
 import 'package:vector_math/vector_math.dart' as vector_math;
-import 'dart:math' as math;
 import 'package:sky/theme/colors.dart' as colors;
 
 const double cardHeight = 96.0;
diff --git a/lib/components/card.dart b/lib/components/card.dart
index f482ca9..9554583 100644
--- a/lib/components/card.dart
+++ b/lib/components/card.dart
@@ -14,6 +14,9 @@
   }
 
   static widgets.Widget imageFromCard(logic_card.Card c, bool faceUp) {
+    // TODO(alexfandrianto): If we allow an optional prefix in front of this,
+    // we would be able to have multiple skins of the same deck.
+    // TODO(alexfandrianto): Better card organization?
     String imageName = "${c.deck}/${faceUp ? 'up' : 'down'}/${c.identifier}.png";
     return new widgets.NetworkImage(src: imageName);
   }
diff --git a/lib/components/card_collection.dart b/lib/components/card_collection.dart
index 27d0bcc..0058cce 100644
--- a/lib/components/card_collection.dart
+++ b/lib/components/card_collection.dart
@@ -20,8 +20,6 @@
   CardCollectionComponent(this.cards, this.faceUp, this.orientation, this.parentCallback);
 
   void syncConstructorArguments(CardCollectionComponent other) {
-    //assert(false); // Why do we need to do this?
-    //status = other.status;
     cards = other.cards;
     orientation = other.orientation;
     faceUp = other.faceUp;
@@ -59,42 +57,15 @@
   }
 
   Widget build() {
-    // Let's just do horizontal for now, it's too complicated otherwise.
-
-    /*double cardDelta = card_constants.CARD_WIDTH;
-    if (cards.length > 6) {
-      //cardDelta = card_constants.CARD_WIDTH / cards.length; // just make it tiny
-      cardDelta -= card_constants.CARD_WIDTH * (cards.length - 6) / cards.length;
-    }*/
-
     List<Widget> cardComponents = new List<Widget>();
     cardComponents.add(new Text(status));
     for (int i = 0; i < cards.length; i++) {
-      // Positioned seems correct, but it causes an error when rendering. Constraints aren't matched?
-      /*cardComponents.add(new Positioned(
-        top: 0.0,
-        // left: i * cardDelta,
-        child: new Draggable<Card>(Card(cards[i], faceUp))
-      ));*/
-      /*cardComponents.add(new Transform(
-        transform: new vector_math.Matrix4.identity().translate(i * cardDelta, 40.0),
-        child: new CardComponent(cards[i], faceUp)
-      ));*/
       cardComponents.add(new Draggable<Card>(new Card(cards[i], faceUp))); // flex
     }
 
-
-    // Just draw a stack of cards...
-    //return new Stack(cardComponents);
-
-
-    /*List<Widget> cardComponents = new List<Widget>();
-    for (int i = 0; i < cards.length; i++) {
-      cardComponents.add(new Draggable<Card>(new Card(cards[i], faceUp)));
-    }
-    return new Flex(cardComponents);*/
-
     // Let's draw a stack of cards with DragTargets.
+    // TODO(alexfandrianto): In many cases, card collections shouldn't have draggable cards.
+    // Additionally, it may be worthwhile to restrict it to 1 at a time.
     return new DragTarget<Card>(
       onAccept: _handleAccept,
       builder: (List<Card> data, _) {
@@ -110,7 +81,7 @@
           ),
           height: 80.0,
           margin: new EdgeDims.all(10.0),
-          child: wrapCards(cardComponents)//new Stack(cardComponents)
+          child: wrapCards(cardComponents)
         );
       }
     );
diff --git a/lib/components/card_constants.dart b/lib/components/card_constants.dart
deleted file mode 100644
index 380718c..0000000
--- a/lib/components/card_constants.dart
+++ /dev/null
@@ -1,2 +0,0 @@
-const double CARD_HEIGHT = 120.0;
-const double CARD_WIDTH = 90.0;
\ No newline at end of file
diff --git a/lib/components/croupier.dart b/lib/components/croupier.dart
index b06ae24..7313003 100644
--- a/lib/components/croupier.dart
+++ b/lib/components/croupier.dart
@@ -1,8 +1,10 @@
 import '../logic/croupier.dart' as logic_croupier;
 import '../logic/game.dart' as logic_game;
+import 'game.dart' show GameComponent;
+
 import 'package:sky/widgets.dart' show FlatButton;
 import 'package:sky/widgets/basic.dart';
-import 'game.dart' show GameComponent;
+
 import 'dart:sky' as sky;
 
 class CroupierComponent extends StatefulComponent {
diff --git a/lib/components/draggable.dart b/lib/components/draggable.dart
index 4415645..ad4cbec 100644
--- a/lib/components/draggable.dart
+++ b/lib/components/draggable.dart
@@ -1,5 +1,6 @@
-import 'package:sky/widgets.dart' as widgets;
 import 'dart:sky' as sky;
+
+import 'package:sky/widgets.dart' as widgets;
 import 'package:vector_math/vector_math.dart' as vector_math;
 
 class Draggable<T extends widgets.Widget> extends widgets.StatefulComponent {
diff --git a/lib/components/game.dart b/lib/components/game.dart
index dc0daf2..5eb4c5b 100644
--- a/lib/components/game.dart
+++ b/lib/components/game.dart
@@ -1,10 +1,12 @@
 import '../logic/card.dart' show Card;
 import '../logic/game.dart' show Game, GameType, Viewer, HeartsGame, HeartsPhase;
+import 'board.dart' show Board;
 import 'card_collection.dart' show CardCollectionComponent, Orientation;
+
 import 'package:sky/widgets/basic.dart';
 import 'package:sky/widgets.dart' show FlatButton;
 import 'package:sky/theme/colors.dart' as colors;
-import 'board.dart' show Board;
+
 
 class GameComponent extends StatefulComponent {
   Game game;
@@ -29,6 +31,7 @@
         return buildHearts();
       case GameType.Board:
         // Does NOT work in checked mode since it has a Stack of Positioned Stack with Positioned Widgets.
+        // Issue and possible workaround? https://github.com/domokit/sky_engine/issues/732
         return new Board(1, [2,3,4], [1, 2, 3, 4]);
       default:
         return null; // unsupported
@@ -55,49 +58,19 @@
   Widget buildProto() {
     List<Widget> cardCollections = new List<Widget>();
 
-    // debugString
     cardCollections.add(new Text(game.debugString));
 
     for (int i = 0; i < 4; i++) {
       List<Card> cards = game.cardCollections[i];
       CardCollectionComponent c = new CardCollectionComponent(cards, game.playerNumber == i, Orientation.horz, _updateGameCallback);
-
-      /*cardCollections.add(new Positioned(
-        top: i * (card_constants.CARD_HEIGHT + 20.0),
-        child: c
-      ));*/
-
-      /*cardCollections.add(new Transform(
-        transform: new vector_math.Matrix4.identity().translate(0.0, i * (card_constants.CARD_HEIGHT + 20.0)),
-        child: c
-      ));*/
-
       cardCollections.add(c); // flex
     }
 
-    // game.cardCollections[4] is a discard pile
-    /*cardCollections.add(new Transform(
-      transform: new vector_math.Matrix4.identity().translate(0.0, 4 * (card_constants.CARD_HEIGHT + 20.0)),
-      child: new Container(
-        decoration: new BoxDecoration(backgroundColor: colors.Green[500], borderRadius: 5.0),
-        child: new CardCollectionComponent(game.cardCollections[4], true, Orientation.horz, _parentHandleAccept)
-      )
-    ));*/
-    /*cardCollections.add(new Positioned(
-      top: 4 * (card_constants.CARD_HEIGHT + 20.0),
-      child: new Container(
-        decoration: new BoxDecoration(backgroundColor: colors.Green[500], borderRadius: 5.0),
-        child: new CardCollectionComponent(game.cardCollections[4], true, Orientation.horz)
-      )
-    ));*/
-
     cardCollections.add(new Container(
       decoration: new BoxDecoration(backgroundColor: colors.Green[500], borderRadius: 5.0),
       child: new CardCollectionComponent(game.cardCollections[4], true, Orientation.show1, _updateGameCallback)
     ));
 
-    // game.cardCollections[5] is just not shown
-
     cardCollections.add(new FlatButton(
       child: new Text('Switch View'),
       onPressed: _switchPlayersCallback
@@ -105,7 +78,7 @@
 
     return new Container(
       decoration: new BoxDecoration(backgroundColor: colors.Pink[500]),
-      child: new Flex(cardCollections, direction: FlexDirection.vertical)//new Stack(cardCollections)
+      child: new Flex(cardCollections, direction: FlexDirection.vertical)
     );
   }
 
@@ -137,7 +110,7 @@
       case HeartsPhase.Score:
         return showBoard();
       default:
-        assert(false); // What?
+        assert(false);
         return null;
     }
   }
diff --git a/lib/main.dart b/lib/main.dart
index 173d822..718f454 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -1,21 +1,8 @@
-//import 'package:sky/widgets/basic.dart';
-
-//import 'card.dart' as card;
-//import 'my_button.dart';
-//import 'dart:sky' as sky;
-//import 'package:vector_math/vector_math.dart' as vector_math;
-//import 'package:sky/theme/colors.dart' as colors;
 import 'package:sky/widgets.dart';
 
-//import 'logic/game.dart' show Game, HeartsCommand;
-//import 'components/game.dart' show GameComponent;
 import 'logic/croupier.dart' show Croupier;
 import 'components/croupier.dart' show CroupierComponent;
 
-//import 'dart:io';
-//import 'dart:convert';
-//import 'dart:async';
-
 class CroupierApp extends App {
   Croupier croupier;
 
@@ -26,7 +13,7 @@
   Widget build() {
     return new Container(
       decoration: new BoxDecoration(
-        backgroundColor: const Color(0xFF0000FF),
+        backgroundColor: const Color(0xFF6666FF),
         borderRadius: 5.0
       ),
       child: new CroupierComponent(this.croupier)
@@ -35,32 +22,5 @@
 }
 
 void main() {
-  print('started');
-  CroupierApp app = new CroupierApp();
-
-  // Had difficulty reading from a file, so I can use this to simulate it.
-  // Seems like only NetworkImage exists, but why not also have NetworkFile?
-  /*List<String> commands = <String>[
-    "Deal:0:classic h1:classic h2:classic h3:classic h4:END",
-    "Deal:1:classic d1:classic d2:classic d3:classic d4:END",
-    "Deal:2:classic s1:classic s2:classic s3:classic s4:END",
-    "Deal:3:classic c1:classic c2:classic c3:classic c4:END",
-    "Pass:0:1:classic h2:classic h3:END",
-    "Pass:1:2:classic d1:classic d4:END",
-    "Play:0:classic h1:END",
-    "Play:1:classic d3:END",
-    "Play:2:classic d4:END",
-    "Play:3:classic c2:END"
-  ];
-  new Future.delayed(new Duration(seconds: 2)).then((_) {
-    for (var i = 0; i < commands.length; i++) {
-      new Future.delayed(new Duration(seconds: 1*i)).then((_) {
-        app.game.gamelog.add(new HeartsCommand(commands[i]));
-      });
-    }
-  });*/
-
-
-  runApp(app);
-  print('running');
+  runApp(new CroupierApp());
 }
\ No newline at end of file
diff --git a/lib/menu.png b/lib/menu.png
deleted file mode 100644
index 38ee213..0000000
--- a/lib/menu.png
+++ /dev/null
Binary files differ
diff --git a/lib/my_button.dart b/lib/my_button.dart
deleted file mode 100644
index c04bf97..0000000
--- a/lib/my_button.dart
+++ /dev/null
@@ -1,63 +0,0 @@
-import 'package:sky/widgets/basic.dart';
-
-final BoxDecoration _decoration = new BoxDecoration(
-  backgroundColor: const Color(0xFFFF00FF),
-  borderRadius: 5.0/*,
-  gradient: new LinearGradient(
-    endPoints: [ Point.origin, const Point(0.0, 36.0) ],
-    colors: [ const Color(0xFFEEEEEE), const Color(0xFFCCCCCC) ]
-  )*/
-);
-
-class MyButton extends Component {
-  final Widget child;
-  final Function onPressed;
-  final Function onPointerDown;
-  final Function onPointerMove;
-  final Function onPointerUp;
-
-  MyButton({this.child, this.onPressed, this.onPointerDown, this.onPointerMove, this.onPointerUp});
-
-  Container makeContainer() {
-    return new Container(
-      //height: 36.0,
-      //padding: const EdgeDims.all(8.0),
-      //margin: const EdgeDims.symmetric(horizontal: 8.0),
-      decoration: _decoration,
-      child: new Center(
-        child: this.child
-      )
-    );
-  }
-
-  Widget build() {
-    return new Listener(
-      // Listeners have these possibly fields https://github.com/domokit/sky_engine/blob/2e8843893b9c1cef0f0f9d9e00d384fca7a70d23/sky/packages/sky/lib/widgets/framework.dart
-      onGestureTap: (e) {
-        print('MyButton was tapped!');
-        if (this.onPressed != null) {
-          this.onPressed(e);
-        }
-      },
-      onPointerDown: (e) {
-        print('MyButton was scrolled!');
-        if (this.onPointerDown != null) {
-          this.onPointerDown(e);
-        }
-      },
-      onPointerMove: (e) {
-        print('MyButton continues to be scrolled!');
-        if (this.onPointerMove != null) {
-          this.onPointerMove(e);
-        }
-      },
-      onPointerUp: (e) {
-        print('MyButton pointer up!');
-        if (this.onPointerUp != null) {
-          this.onPointerUp(e);
-        }
-      },
-      child: makeContainer()
-    );
-  }
-}
\ No newline at end of file
diff --git a/lib/search.png b/lib/search.png
deleted file mode 100644
index 9c81036..0000000
--- a/lib/search.png
+++ /dev/null
Binary files differ
