Refactored repository

Refactored code into src directory and added examples and tests
directories