Styled code according PEP8, extracted api files from main file.