1. In regard to the fan, if it is getting hot, then it isn't working correctly. You need to make sure it is isn't full of dust and debris. If that doesn't resolve it you can try replacing the thermal paste. Should that not resolve it, then you probably need a new fan.
2. For the keyboard...try this...
1. Uninstall the keyboard driver.
2. Reboot the computer (without reinstalling the driver).
3. When it restarts, it should reinstall the driver on its own.
If this doesn't work, you may wish to try connecting an external keyboard and see if it works fine. If it does, then it could be the keys themselves that are the issue.
3. And for the new battery problem, are you sure the battery was charged long enough. Sometimes new ones need a while to charge up.