Some refactoring done
Merge pull request #1 from Spaceinvaderz/feature/pullreq

Some refactoring done