Finished initial version for Unix platform