Cleanup for linux porting #3