Version 1.0

- Added tests
- Refactored code