Introduced new tests and refactored some others