added project tests and refactored