Added Mac support and improved extensibility or other OSes support