added mouse dragging and a nullpointerexception catcher in
Core.paintComponent