Clean up and reorganize some parts of the code
Merge pull request #3 from denisgarci/master

Clean up and reorganize some parts of the code