added main for later library use
added bin, corrected version