Added windowing and input classes, refactored graphics context.