Separate API from network processing

and use asynch rest calls
project file