Improving code

Add namaspaces
Remove variable unsed
Change tabs to spaces