Cleanup for linux porting