added spent by and cleaned up code
Merge pull request #5 from swapnilbhagat/master

added spent by and cleaned up code