Rebuild with getops() + some minor changes