Add check method and PEP8 fixes