Fixed #25 and minor issues