Fixed few errors and PEP8