Added terminal and tests to the solution