If I were you, I would check with City Hall. They will be able to give you accurate advice with regards to the laws and ordinances that may affect you. The apartment owner may have violated laws by not having CO2 detectors, and not having a properly working heating system. From a personal stand point, and as a rental property owner myself, If you are leaving the property in the same or better condition than when you arrived, I would be giving you back your security deposit. However, when you noticed that there were problems, you should have notified him immediately.
I strongly suggest that when you move into your new place that you take pictures before you move in, so that when you move out, and want your security deposit returned, you will have proof of what the place looked like.
I wish you luck, and hope this has helped you.