Added negative number support based on boolean parameter (Issue #20) and fixed Issue #29