Removed dead code
Fixed bug when taking the module of a negative number