Some Pylint stuff

Hi.

I just introduced myself to code and refactored api stuff to own file to keep main file more readable  I also ordered imports of main program and newly created api-file, so that you can better see, what functions/classes they are using.

I ran Pylint for them.  If you can accept my changes.

-Eino 
BitMessage: BM-2cV6TyAGNPHnic5iXDuTodrYZBVRdB8W1y