Some data refining scripts