You haven’t provided any details about what’s wrong with your controller. You’ve just said it doesn’t “feel right, or work right”. If you want help with your actual code, you’ll need to tease apart the issues, and try to address them one at a time, and be specific about the problems.
Unless there’s some reason you really want to invest a lot of time building and maintaining your controller, I’d recommend you just use what Unity provides for free. You can customize it from there if you want. But I suspect there’s some stuff in this thread that could help you: