Added final elements
Started tests
Corrected bugs