Main graphics done. Now to implement the logic.