pylinting and cleanup