Rewrote some old javascript classes into c#, refactored the input management system.