Various fixes and modifications to core commands.