Added new tests and updated classes