Added mouse control and some debugging