Cleanup imports and loadavg refactor