General cleanup & bugfix

Fixed a bug where increment would not work properly if negative number is given