Handling input for the controller

This isn't the way we want to do it, but it works for now at least.