Refactored HMI script to add support for more platform. Added makefile for mac