Major refactor of OInput.cs. Much easier to maintain now.