Updates made to reversePolish method

After this update it should now be able to properly work provided that the other classes are capable of handling negative numbers