refactored tests/init.py and added docstrings