cleanup and improvements in physical mem manager.