Bug fixes, PEP8 and headers.