Replaced deprecated commands \ misc stuff